最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

migration - Migrate wordpress server to localhost problems

matteradmin6PV0评论

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: /

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?

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/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?

Share Improve this question asked Apr 1, 2019 at 21:42 user164247user164247 1 1
  • 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 Commented Apr 2, 2019 at 0:40
Add a comment  | 

1 Answer 1

Reset to default 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/plugins/search-and-replace/

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

Post a comment

comment list (0)

  1. No comments so far