I am moving my WordPress installation on localhost to a test server, which doesn't have WordPress installed.

  • exported my database as SQL and replaced http://localhost/wordpress with http://mydomain.myserver.com/wordpress, then imported it to the server
  • copied my WordPress folder into Apache server, with same folder name and proper access rights
  • deleted .htaccess file and flushed permalinks

I am able to access admin pages without a problem, but everything on the site including home page is giving 404. What more can I try to solve it?

Additional info:

  • I wrote a simple theme myself and it's working on localhost properly, don't know if it may affect the 404 error I'm getting.
  • localhost is Windows and the server is CentOS.
  • apache mod_rewrite seems to be enabled
  • localhost is Windows and the server is CentOS. Please describe this distinctly. CentOS is not a server.
    – Max Yudin
    Commented Nov 11, 2016 at 13:09

2 Answers 2


If you're using query monitor plugin, remove .db file from wp-content folder.


You need to update your database URLs:

  • Upload local database
  • Go to your live database, find a table called: wp_options
  • Replace the siteurl and the home with your new URLs (live), e.g. http://www.myliveurl.com/

You should be all set.

  • they are same and both seems to be correct, they are like myliveurl.com/wordpress, and on the localhost localhost/wordpress so /wordpress part must be correct
    – uylmz
    Commented Nov 11, 2016 at 14:05
  • 1
    With myliveurl.com/wordpress ? If you can login to the backend, goto: Setting | Permalinks | And refresh your permalinks (generate a new htaccess). Try this without the clean URLs – first option
    – user23355
    Commented Nov 11, 2016 at 14:11
  • it works when I change it to first permalink option, doesn't work with second option :/
    – uylmz
    Commented Nov 11, 2016 at 14:27
  • Sorry for the late reply. It could be: - File permissions on your .htaccess file - check that you have write permissions
    – user23355
    Commented Nov 12, 2016 at 11:17
  • Also check that you have Apache mod_rewrite enabled. Check with your web hosting provider, or you can add this piece of code to your index.php in your WordPress theme to view your Apache / Php settings: <? phpinfo(); ?>
    – user23355
    Commented Nov 12, 2016 at 11:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.