WordPress.org

Ready to get started?Download WordPress

Forums

How to change permalink ("slug"?) of one "Page" - WordPress 3? (16 posts)

  1. daydull
    Member
    Posted 3 years ago #

    Hi, I am trying to figure out how to edit the permalink of a single page created under the "Page" section of wordpress. It seems this has changed in the recent wordpress versions since I remember there used to be an edit permalink button when editing the page.

    I searched, but only found an out of date tutorial that shows this edit button that isn't there anymore! Here's the link to that FAQ if you're interested... Now all I see under the Page title box is the "Change Permalinks" button (takes you to the change ALL permalinks screen) and "View Page"
    Help!

    (To be more detailed, I want to create a "Contact" Page in the pages menu that goes directly to myurl.com/contact and probably another page that goes back to the home page which would just be myurl.com)

  2. esmi
    Forum Moderator
    Posted 3 years ago #

    I remember there used to be an edit permalink button when editing the page.

    There still is. It's right next to the permalink under the Page Title.

  3. daydull
    Member
    Posted 3 years ago #

    Thanks for the response. Unfortunately I do not have that...

    Using the latest version of wordpress 3 and the default permalink structure settings (the theme I'm using seems to require this). What I see when I go to edit a "Page" looks like this:

    [Box for Page title]
    Permalink: http://myurl.com/?page_id=62 [Button: Change Permalinks] [Button: View Page]
    
    (Then the article editing toolbars and article text box etc)

    That "Change Permalinks" button just sends me to the main permalinks page that edits the whole permalinks structure. Thanks for any help!

  4. What are your permalinks set to? What you're seeing is what you get when you're using default (i.e. ugly) permalinks. You need to set 'em to something pretty for that to work :)

  5. daydull
    Member
    Posted 3 years ago #

    Yes my permalinks are set as default. Thanks for the info that must be the issue... It seems the theme I'm using requires the default permalink structure, when I change to anything else I get a 404 error when trying to visit myurl.com (it can't seem to find the main index page). though the other Page links do work fine from there...

  6. Do you have a .htaccess file? What's in it?

  7. daydull
    Member
    Posted 3 years ago #

    Hm, yes, inside it was:

    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^mysubdomain.myurl.com$ [OR]
    RewriteCond %{HTTP_HOST} ^www.mysubdomain.myurl.com$
    RewriteRule ^/?$ "http\:\/\/myurl\.com\/mysubdomain\/" [R=301,L]
    
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress

    (This is a subdomain of another site I have) I don't know much about the above .htaccess stuff :)

  8. Okay, then you may want to talk to your host. The WordPress stuff is correct, and the subdomain should be a non-issue. The .htaccess isn't reading correctly, though. It SHOULD automagically know to go to yoururl.com/index.php

    You can test it by turning on pretty permalinks again and manually going to http://myurl.com/index.php - If THAT works, then your host is weird and they should be able to help you.

  9. daydull
    Member
    Posted 3 years ago #

    Going to myurl.com/index.php gives me the same 404 error as going to myurl :(

    I don't think it is my webhost's (Hostgator) issue. I have another wordpress site hosted on the same Hostgator account and use "pretty" permalinks there without a problem.

    Could it be specific to the wordpress theme I'm using?
    I'm running "Sharpfolio"
    The site i'm running this on is http://oneaday.scottoleson.com I currently have it set to the "pretty" numerical permalinks structure

    Thanks for all the help so far!

  10. You could test by switching to the default (TwentyTen) theme and turning off your plugins, obviously ;)

    Is that the .htaccess in the oneaday folder or in the main folder for the site?

  11. daydull
    Member
    Posted 3 years ago #

    The above .htaccess is from the oneaday folder
    I tried out twenty ten and its still giving me the 404 error when going to oneaday.scottoleson.com =\ So that rules out the theme being the problem I suppose?

    I can't imagine its something wrong with my webhost though, since my other WordPress site on the same account works just fine with pretty permalinks?

    Is there anything else I could look into that might cause this? All the Page links, category links, links to archived posts, etc all work fine with pretty permalinks...just the main page doesn't show up unless I choose the default non-pretty permalinks structure.

  12. I can't imagine its something wrong with my webhost though, since my other WordPress site on the same account works just fine with pretty permalinks?

    Subdomains are not all created equal, man. Ask your host. Tell them 'Hey, this is happening when I try to use this .htaccess in WordPress. Why isn't it seeing my index? Are there restrictions on mod_rewrite in subdomains?'

  13. daydull
    Member
    Posted 3 years ago #

    Got it!

    Looks like the cause was that I had previously changed the Site Address (In the WordPress Dashboard, Settings>General menu) TO mysubdomain.myurl.com FROM the original myurl.com/mysubdomain

    I switched back to the original Site Address setting, then had to swap permalinks settings back and forth once. WordPress then displayed a new rule for me to update the .htaccess with. Did it and all is well now!

    Maybe the way I have this subdomain set up is weird? In my webhost FTP, the subdomain is a folder inside of the main domain's folder. I think if I had put the subdomain in the same folder as the other full domains, this probably wouldn't have happened. (I hope that makes sense to anyone who runs into the same problem)

    Thanks for the help Ipstenu

  14. No that's the normal way of setting up a subdomain, but ... that makes not a lot of sense.

    What's the new .htaccess rule? I'm curious now, since the default should've been right, subdomain or not!

  15. daydull
    Member
    Posted 3 years ago #

    "If your .htaccess file were writable, we could do this automatically, but it isn’t so these are the mod_rewrite rules you should have in your .htaccess file. Click in the field and press CTRL + a to select all."

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /oneaday/
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /oneaday/index.php [L]
    </IfModule>

    Not sure why .htaccess wouldn't be writable already. I guess this actually might have been the issue--that when I tried to update the permalinks/site address, the .htaccess could not be updated (though I do not remember seeing this message when trying to troubleshoot the problem)? File permissions are currently 644...what should it be set as?

  16. Wow...

    Okay, that's strange. A subdomain SHOULD be able to take the base of / since it's its own domain, in a manner of speaking. Or I've not had enough coffee.

    Don't worry about the permissions. Once you're set up, you don't need to edit that file again. 644 is nice and secure!

Topic Closed

This topic has been closed to new replies.

About this Topic