Solved

Removal of old slug / permalink

Posted on 2013-11-06
17
463 Views
Last Modified: 2013-11-11
In wordpress I previously created a page with a permalink ending "contact". This page has since be deleted and trash has been emptied.

I have now created a new page and used the same permalink "contact". When this page is viewed from the frontend it is showing the old page and not the new page, even though the previous one has been deleted. I have read some articles about going into the mysql database and searching for the post name called "contact" in the post table. I have done this and deleted the record. Even doing this I am still seeing the old page.

Why is this happening?

Just so you know if I change the permalink to something else I can view the page correctly.
0
Comment
Question by:petewinter
  • 6
  • 6
  • 5
17 Comments
 
LVL 14

Expert Comment

by:quizwedge
ID: 39628512
Perhaps a caching issue? Try opening the page in a "Private Browsing" or "Incognito" tab. If it works there, then it's a caching issue. Clear your browser's cache and it will start working.
0
 

Author Comment

by:petewinter
ID: 39628615
quizwedge - Thanks for the advice. Tried that, but it is still the same. Any other idea's?
0
 
LVL 14

Assisted Solution

by:quizwedge
quizwedge earned 300 total points
ID: 39628813
If it's a public page, I can send you a screenshot of what I see just to make sure it's not something on your end.

Other suggestions...

Could there be a plugin you're using? Check out http://wordpress.org/support/topic/add-a-page-after-deleting-original

Also, did you delete revisions? I haven't completely reviewed the article and you should ALWAYS backup your database before performing a delete, but this article (http://www.ambrosite.com/blog/clean-up-wordpress-revisions-using-a-mysql-multi-table-delete) claims to delete ALL revisions and may clean up your issue. Like I said though, backup your database first in case it deletes something you want to keep.
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 39629094
Check for a Wordpress caching plugin, not just the browser cache.
0
 

Author Comment

by:petewinter
ID: 39629810
Thanks for the advice, none of the suggested solutions fixed the issue.

I have also tried this plugin: http://wordpress.org/plugins/rvg-optimize-database/ to clean the database.

This is the problem page: http://test.petewinter.com/contact/

Is should view like this copy of the page: http://test.petewinter.com/contactus/

Any other idea's?
0
 
LVL 70

Assisted Solution

by:Jason C. Levine
Jason C. Levine earned 200 total points
ID: 39631094
When I look at the source code for the two links above I see:

<link rel='shortlink' href='http://test.petewinter.com/?p=5001' /> /contactus/

<link rel='shortlink' href='http://test.petewinter.com/?p=5005' /> /contact/

Incidentally, I also see:

<link rel='prev' title='Support for SME' href='http://test.petewinter.com/products/infrastructure-support/support-for-sme/' />
<link rel='next' title='Contact Test' href='http://test.petewinter.com/contact/' />

in contactus which might indicate it's a post or custom post type and not a page.

Is it possible you created a post as well as pages and that's where the conflict is?
0
 

Author Comment

by:petewinter
ID: 39631252
jason1178 - Thanks for the reply. I tried deleting both the pages and recreating and I still have the same issue.

I can't see a post or custom post type with the slug "contact".

Any other idea's?
0
 
LVL 14

Expert Comment

by:quizwedge
ID: 39631402
What happens if you delete the contact page and then try to go to it without recreating it? Does it error or does it still show the contact page?
0
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 39632147
I can't see a post or custom post type with the slug "contact".

Don't look for slugs, look at the Post IDs (5001 and 5005) and I would do so directly in the database tables.

I tried deleting both the pages and recreating and I still have the same issue.

Can you restate the issue? Is it the presence of a second page at all or a page that looks different than what it should?
0
 

Author Comment

by:petewinter
ID: 39632854
quizwedge - When I delete the pages the url goes to a 404 error page.

jason1178 -

1) I have search for the post IDs and they are no longer there as I have deleted the pages and recreated so they will be under new IDs

2) If I create any page and try to use the permalink "contact" it shows the old page. So this old page is somewhere, but I can't find it.

Also for some reason my "revisions" feature is missing from the pages. I can't see it under the screen options?
0
 
LVL 14

Assisted Solution

by:quizwedge
quizwedge earned 300 total points
ID: 39635896
I'm stumped but I think the key is somewhere in the database unless you happen to have a page uploaded outside of Wordpress?

Regarding revisions, you'd have to be able to bring up the post in the admin. http://blog.teamtreehouse.com/how-to-use-wordpress-revisions-to-go-back-in-time
0
 
LVL 70

Assisted Solution

by:Jason C. Levine
Jason C. Levine earned 200 total points
ID: 39635940
Revisions can be disabled in wp-config.php. Some "one-click install" packages enable this by default as revisions create a fair amount of database bloat and there is a "scare factor" promoted about bloat no matter how small the site.

I'm kind of stumped as well.  I think you need someone to actually log in and look at the site/database/backend to diagnose further.
0
 
LVL 14

Expert Comment

by:quizwedge
ID: 39635954
Just to clarify @jason1178's comment, you should not post the login credentials here as what gets posted here is rather public and you don't want your site hacked.

If you could make sure that there is no password or private information in the database, you could post your Wordpress database. I'm not certain where all of that is stored though.
0
 
LVL 14

Accepted Solution

by:
quizwedge earned 300 total points
ID: 39635957
Also, though I haven't tested any of these plugins, you may want to look into the WordPress clean-up plugins:
http://wordpress.org/plugins/wp-optimize/
http://wordpress.org/plugins/wpdbspringclean/
http://wordpress.org/plugins/wp-clean-up/

Just make sure to backup first.
0
 

Author Closing Comment

by:petewinter
ID: 39638192
Many thanks for your help. I have now resolve the issue. Really strange one... My wordpress theme has a page template for the contact page. Once I deleted this php file it resolved the issue. The strange thing is the page was not using this template so I assume there must be some overriding code in the theme that caused this issue.

On the revisions comment. The option just disappeared because there were no revisions. I just assumed the option would still be there regardless.
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 39639090
This is why it was happening:

http://codex.wordpress.org/Template_Hierarchy

Anything with the slug "contact" would use that template.
0
 

Author Comment

by:petewinter
ID: 39639094
jason1178 - Many thanks for the information.
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
This article discusses four methods for overlaying images in a container on a web page
The purpose of this video is to demonstrate how to add AdSense Ads to a WordPress Website, and how to set up WordPress to automatically place Ads in Sidebars. This will be demonstrated using a Windows 8 PC. Log into your AdSense account. : Cli…
The purpose of this video is to demonstrate how to set up an RSS Feed on a WordPress Website. This will be demonstrated using a Windows 8 PC. Feedburner will be used for this demonstration. Go to your WordPress login page. This will look like the…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now