Fix the 404 Error of WordPress Websites Hosted on Hostgator
75In order to diversify my website portfolio, I have recently opened a Hostgator account and put some of my more “global” targeting websites on their server. It all went well at the beginning – the load speed was good, control panel was easy to manage and to be honest it was very cheap – can’t really go wrong with the price of a return bus ticket. But as soon as I changed my permalink structure, all the links on my sites went crazy. This is the most annoying part - I have not had similar problems with other servers so far. Everything except the homepage I clicked shows a big 404 error.
404 Error Shows When Permalinks Structure Changed
It took me a while to figure out what happened and fix the problem. Presumably if you are looking for this information on Hubpages as well, just like me, you don’t really care about the technical nitty gritty. All we want to do it to fix this problem in a few simple steps. Okay, here we go:
1. Log on to your Hostgator Hosting Control Panel, open up File Manager, check if an “.htaccess” exists in the “public_html” directory. Remember to tick the box “Show Hidden Files (dotfiles)” when launching File Manager. If the file does exist, go to step 3, otherwise proceed to next step.
2. Create a text file named “.htaccess” by clicking New File on the top left hand corner of the menu bar.
3. Open up .htaccess file by clicking Edit. If it is a new file, copy and paste the following lines in to the file. If it is an existing file, delete the contents and replace with the following codes.
# BEGIN WordPress
ErrorDocument 404 /index.php?error=404
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]# END WordPress
4. Save and exit
Voila, it is as simple as that, all done! Hope it helps.







khalid 15 months ago
Thank you very much
Its worked on my arabic blog.
Was searching for 3 days
Thanks a lot