• Is it possible to remove unused pages from the database? Example: I was testing a page and created and then deleted a page called “Jobs”. Each time I created the page WordPress increments the page url (www.website.com/jobs-2/, /jobs-3/) and so on. Is it possible to delete these pages and get “back” to just …/jobs/?

Viewing 12 replies - 1 through 12 (of 12 total)
  • When you delete a page you also need to make sure to delete it from the trash to stop what is happening to you happening.

    Thread Starter squishy79

    (@squishy79)

    That worked…now I feel dumb for not figuring that out.

    Thanks!

    Not a problem, many people over see the little stuff 😛

    I had the same problem! Feeling a bit dumb, too! Thank you Snat!

    What if that page was made with the magic fields plugin and doesn’t show on the trash bin? anyone got that already?

    Edit Page, remove custom fields, save, quick edit Page, send to Trash, empty trash?

    Also, once you have cleaned up Trash, and your Page Title or the Slug have a -2 or -3, you can simply edit the slug or title and save. The number is appended if the text is a match to a Page in existence in the DB upon save. The Page ID does not change.

    Great tip, Swanson. Followed it and it worked precisely.

    Problem is, The one I had was already a “-2” because the first one I erased removing the whole write panel via magic fields options. So, I guess a messed that up right?

    I’m looking for a way to erase it via the Database. Right Path?

    Recreate a new page now (just copy and paste html) and save.

    Copy the HTML, paste that in a text editor, delete the pages and revisions and trash, create new page using the old html and same title and slug)

    If you are comfortable with editing the database, it should be fairly straight forward. Posts, Pages and revisions are in the wp_posts table and can be sorted by post type (page, post, revision, attachment.)

    Unless you have very many pages and posts or revisions, it is best to leave things in the db alone, just because a table has a line for a post revision, i.e, isn’t really slowing anything down, it might save a few hundreds of a second in a query on a large site to remove these.

    When a bot indexes your site, it does not have db access so it just goes through your site’s publicly available pages and their links. A good tool to check for broken links is XML-Sitemaps.com

    If your site was indexed when permalinks were not set as you desired, or you have removed content, etc., create a sitemap and have your robots.txt file point to it. The Search Engines will catch up eventually.

    Just great Swanson,

    I spent the afternoon on scanning the DB not sure of anything, so once you told me where to look I just found a lot of versios of that page, erased them all and then I was able to create a new one with the right slug.

    Thanks a lot.

    You are quite welcome…please mark this issue as resolved.

    Can I do that? or only the topic author? I’m new to the forum but I’ve read that the option should be under “about this post” and it doesn’t show there. Anyway, it’s resolved, if anyone visits here, know that the solution presented here, works.

    @tonandon, your are correct, only the OP can mark this resolved…

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Remove unused pages from database?’ is closed to new replies.