Friday , 28 November 2014
Home » .htaccess » [WordPress] Fix 404 Errors for Posts and Pages when moved to Live
[WordPress] Fix 404 Errors for Posts and Pages when moved to Live

[WordPress] Fix 404 Errors for Posts and Pages when moved to Live

Hi Friends,

WordPress create rewrite rules which are responsible for managing permalink (Pretty URLS) in .htaccess file automatically. so when you moved your site from one host to another or moving your WP site from your local server to live server, you might face 404 errors for all inner pages but your home page will works fine. WordPress generates this common 404 Errors for Posts, Pages, Custom Post Types, Custom Post Type Taxonomy.

# Solution 1 #

It’s a problem of redirection code in .htaccess file which manages pretty urls redirections. All you need to do is visit the Permalinks page and WordPress will rewrite .htaccess for you.

Navigate to : Dashboard > Settings > Permalinks and Click on Save Changes button.

Look at the screenshot for visual appeal.

wordpress 404 error fixes [WordPress] Fix 404 Errors for Posts and Pages when moved to Live

Now go to front page and navigate to any of your posts or pages. 98% it will works.

# Solution 2 #

If above solution does not work for you, it might be case that your .htaccess file does not have enough write permission. so WordPress failed to update it. Here is a solutions.

Navigate to your Root Directory of your WordPress Installation in FTP Program and find .htaccess file. Right Click on it, change the permission to 666. Now follow the step above by navigating to Dashboard > Settings > Permalinks and Click on Save Changes button.

Now go to front page and open any of your posts or pages. Will it work ? 99% it will work.

# Solution 3 #

If above solution also does not work for you, try with below solution.
1. Navigate to your theme’s directory in FTP Program.
2. Find the functions.php file.
3. Open the file in HTML Editor (e.g. Dreamweaver)
4. Add below line at the end of file.
flush_rewrite_rules();

I hope this will fix WordPress 404 Issue. 99.99% either of the one solution will works for you. If still you face same issue, there might be a different issue of plugins or so. Contact your Developer or Contact me to have custom solution for it. icon smile [WordPress] Fix 404 Errors for Posts and Pages when moved to Live

About Rakshit Patel

I am PHP Freelancer, Rakshit Patel AKA WordPress Freelancer working as PHP Programmer India. I am here to share all my developing knowledge, quick coding techniques, quick solutions to save your time and help you guys for any issue or bug fixing. If you have any PHP, WordPress, Magento related work, please contact me. I am interested for the work.

One comment

  1. I already encountered this error, but I don’t know which solution I used before, hehe, but I think solution #1.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Sitemap