WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Can't change "blog-2" slug, yet trash is empty! (2 posts)

  1. Unbeliever64
    Member
    Posted 1 year ago #

    I am a database programmer, but new to WordPress.

    The site I am building is at: http://CorvallisSecular.org

    My web host provided a script for installing WordPress 3.4.2; after successfully running that, I promptly upgraded to 3.5.

    I am NOT running "multi-site".

    I installed wordpress to its own subdirectory: (http://CorvallisSecular.org/wordpress/)

    I have a static front page, and a handful of other pages.

    I am using the Graphene theme, and a few carefully selected plugins.

    My "permalinks" is set to: /%year%/%monthnum%/%day%/%postname%/

    My problem is that I want my blog page slug to simply be "blog", but WordPress insists on making it "blog-2".

    Other people on this site have had this problem previously, and the solution was that they hadn't emptied their trash.

    LET ME ASSURE YOU, MY TRASH IS EMPTY!

    I have deleted the blog page, emptied the trash, recreated it, and WordPress insists on making the permalink "blog-2". I can change it to anything I like -- except "blog". It's not giving me this grief with any of the other pages on my site.

    I haven't created a category or tag named "blog", and I have no "blog" subdirectory, or file in my file structure. Nothing else should be using this slug.

    One clue: If I try to visit http://CorvallisSecular.org/blog/, it redirects to the root of my site. If I type gibberish in place of "blog", I get a 404. So SOMETHING is up...

    Does anyone have any word of wisdom? I REALLY want my "blog" slug!

    Thank you in advance...

  2. Unbeliever64
    Member
    Posted 1 year ago #

    Well, I had to cheat in order to fix the problem. I only hope I didn't break anything in doing so.

    For future reference, the problem was that the slug for my STATIC FRONT PAGE had somehow been set to "blog". The thing is, the WordPress interface never displays the slug for the front page -- it just shows the plain URL -- so I had no way of knowing that the front page even HAD a slug.

    I wound up using my rad database skillz to find and fix the issue:
    1) I ran phpMyAdmin on my host server, and logged into the WordPress database.
    2) There, I viewed the wordpress_posts table (which also contains your static pages).
    3) The post_name field is actually your slug. This is where I found that the "blog" slug actually belonged to my static front page. (Which explains the "clue" I'd discovered in my previous post.)
    4) Verifying that no other "post" had a slug of "home", I modified the front page's slug from "blog" to "home" (which is what I had named the front page).
    5) Then I modified my blog page's slug from "blog-2" to "blog" and exitted stage left.

    Voila! Everything seems to be working the way I'd hoped.

    I'm just very paranoid about directly making changes to strange databases. I will be very sad if I broke something else...

    But, assuming I didn't, I hope this info helps the next person with this problem! :)

    NOTE: PLEASE ALWAYS LOOK (HARD) FOR OTHER SOLUTIONS, BEFORE MANUALLY POKING AROUND IN A STRANGE DATABASE!!!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags