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

wordpress-freelancer-developer

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

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. :)

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.

 • Twitter • Linkedin • Youtube • Flickr • Instagram • 

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

  • James
    March 15, 2014 at 2:50 pm

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

  • rachel @ Efficient momma
    February 24, 2015 at 12:07 am

    I’m getting a 404 error on one of my affiliate links. The company says it’s not working in my end. Any suggestions?

Leave a Reply

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

Sponsors

Sponsors

Recommended

DHgate Computers
DHgate.com - Computers, Cell Phones & more
  • We find everbuying built in php and use css to control the style.

About Author

PHP Freelancer

PHP Freelancer I am PHP Freelancer
PHP Freelancer
, Rakshit Patel working as PHP Programmer India. I am here to share all my developing knowledge with you people. For Hire PHP Developer India, contact me.
Follow on twitter: @raxit4u2

Get Free Programming Tutorials:

Become a Fan

Popular Topics

Recent Posts

Most Popular

Recent Comments

Get a Free Quote
$
$
$
Security Question: 3 + 8 = ?
$