Unable changing wordpress default permalinks, it possibly makes your blog go to 404 page not found error when you comment or click on a post title.
Changing permalinks settings is usually can be done easily because when you set permalinks in your wordpress admin dashboard, see more in this video tutorial, .htaccess will automatically be updated if it’s writable.
Or if it’s writable but doesn’t update, this can be caused because your webserver doesn’t install Apache mod_re_write module. This module is very useful if for example, you want to do redirect or make your URL prettier. If you have no idea about what it is, ask your webhosting support. They should inform you.
Where is .htaccess?
It is a hidden file, but you can find it easily in your cPanel.
1. .htaccess can be found when you click “file manager” and make sure you tick “show hidden files” then click “go”.
2. Once you clicked go button you should see your .htaccess file.
3. Select it and click “code editor” button in the right upper top bar.
4. Once you click that button you should see what your .htaccess content is.
I recommend that before you change anything, copy all of the content and paste it in notepad and save it somewhere in your computer. In case something is wrong, you can copy and paste back again. The above image is my .htaccess file looks like. If you get wordpress permalinks 404 error page or post, try adding this code:
ErrorDocument 404 /index.php?error=404
after <IfModule mod_rewrite.c> line.
At the end your .htaccess content is:
# BEGIN WordPress
<IfModule mod_rewrite.c>
ErrorDocument 404 /index.php?error=404
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Don’t forget to click “save changes” button.
Check if the permalink works. If it still doesn’t work, change your post title, and update it, and check again.
If it still doesn’t work, switch back to default wordpress permalinks, and ask wordpress.org support forum.
Goodluck!
You have really good tutorials for WordPress. Thankyou. I am just doing my first website and your tutorials are really helpful. You teach all the important stuff that needs to be taught like changing your permalinks, backing up your blog, and lots of other good tutorials.
@Russell, Thank you for the nice comments.
I am glad you found that my blog is helpful, that’s my goal to help other newbies like myself.
Have a good day Russel:)
Hi,
Great tutorial! You helped me out!
Thanks!
Jack,
Glad to hear! Most welcome.
Thanks for leaving a comment.
Kimi.
I’m having this problem right now on some domains. Either I’m doing something wrong (which is very possible) or hostgator doesn’t automatically have this mod-rewrite plugin installed. Thanks for the tutorial.
After 6 hours….i found this…and solved the problem in 2 minutes…
dont know if im happy of pissed but anyway, thnx!!
I use wordpress 3.2.1. THis method not work in my local site… I confused how to solve this problem. So, I downgrade my wordpress to 3.0. THank for your tutorial