Recently I publish my site. I moved my site form localhost to server. I change all config file but url site is redirecting for ohter url. The site only show the nav-bar and in the content part show 404 error. The redirecet is http://www.mi-site-example.com to http://www.mi-site-example.com/:/www.mi-site-example.cowww.mmi-site-example.com

  • If you only changed a config file, you also need to change URLs in the database. It's usually simplest to use a migration plugin because WP stores a lot of serialized data that can get messed up if you try to change it manually. You may also need to check your .htaccess file and plugins for redirects; your redirect wasn't clear, but that type of problem could also come from a poorly-coded theme that's using relative links that only work if you have WP installed in the site root and not a subfolder. – WebElaine Sep 25 '17 at 17:14
  • Did you make sure you changed all the old URLs in your database to the new URL. Specifically in the wp_options table. WP DB Migrate is a usefully plugin to use if you haven't made any admin changes on your new site yet. Otherwise you will have to do some SQL commands on your database to find and replace the URLs. – WizardCoder Sep 25 '17 at 20:08
  • @WebElaine I copied all files from local to server, changed URL in wp_option table and modified .htaccess file. Do you recommend me that use a plugin to migrate al data? – Alejandro Mariño Molerio Sep 27 '17 at 1:22
  • Yes. As I already mentioned WP stores a lot of serialized data, and only updating the options table and .htaccess will miss a lot of URLs that need to be changed. – WebElaine Sep 27 '17 at 15:36
  • @WebElaine some plugin suggestion? – Alejandro Mariño Molerio Sep 27 '17 at 23:23

Use the duplicator plugin. It basically make a snapshot and an Installer.php file. When moving the archive snapshot zip and php file to your new server, you navigate to http://yoursite.com/Installer.php. It's like a setup process that asks you for your new database (you can point it to an empty database) and what the new URL should be. It will update your URL all across the site to the new URL.

Once I found this plugin I have never used anything else.

Plugin link: https://wordpress.org/plugins/duplicator/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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