最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

migration - Migrate wordpress server to localhost problems

programmeradmin2浏览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: /

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 !!!

发布评论

评论列表(0)

  1. 暂无评论