Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 524
  • Last Modified:

Removal of old slug / permalink

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
petewinter
Asked:
petewinter
  • 6
  • 6
  • 5
5 Solutions
 
quizwedgeCommented:
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
 
petewinterAuthor Commented:
quizwedge - Thanks for the advice. Tried that, but it is still the same. Any other idea's?
0
 
quizwedgeCommented:
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Jason C. LevineNo oneCommented:
Check for a Wordpress caching plugin, not just the browser cache.
0
 
petewinterAuthor Commented:
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
 
Jason C. LevineNo oneCommented:
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
 
petewinterAuthor Commented:
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
 
quizwedgeCommented:
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
 
Jason C. LevineNo oneCommented:
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
 
petewinterAuthor Commented:
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
 
quizwedgeCommented:
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
 
Jason C. LevineNo oneCommented:
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
 
quizwedgeCommented:
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
 
quizwedgeCommented:
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
 
petewinterAuthor Commented:
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
 
Jason C. LevineNo oneCommented:
This is why it was happening:

http://codex.wordpress.org/Template_Hierarchy

Anything with the slug "contact" would use that template.
0
 
petewinterAuthor Commented:
jason1178 - Many thanks for the information.
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

  • 6
  • 6
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now