0

For the last few day I was working on a website that I built on a server. I finished the website and I decided to backup my files and test it on localhost. I followed this guide here: https://www.wpbeginner.com/wp-tutorials/how-to-move-live-wordpress-site-to-local-server/

I put all my files to htdocs, imported the database, change my domain to localhost and tweaked the wp-config file.

Now the control panel is broken, there is no css at all, half of the pages still redirects to my domain and not on localhost. I have searched for a lot answers, couldn't find none.

Any ideas?

  • When you say you "change my domain to localhost" what exactly did you do? Please try to provide some more information about what you did for the different steps so that we can better assist you. – phatskat Apr 2 at 0:40
0

I have not looked at the guide but chances are that it's still looking for resources from the server URL. I would start by defining in your wp-config.php file the following:

define('WP_HOME', 'YOUR_LOCAL_SITE_ADDRESS');
define('WP_SITEURL', WP_HOME);

And then do a search/replace using a plugin finding all instances of your server address by your local address.

This plugin should help you:

https://wordpress.org/plugins/search-and-replace/

!!! BACKUP the database before you do any replacements !!!

  • The redirection problem was my fault instead of linking an internal url page I straight up used links. Also instead of transferring all my files I only transferred wp-content with a fresh install of wordpress. That solved the css problem. I still have problems with some plugins not showing up in my page but I decided not to give it a further thought – user164247 Apr 2 at 11:02

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.