我正在尝试将网站从实时URL移到我的本地MAMP环境.当wp-admin继续将我重定向到我的实时网站或说某些页面不存在时,我在背面感到非常痛苦,该怎么办?
I am trying to move a site from a live URL to my local MAMP environment. How could I do this as I am having a real pain in the back side doing this as wp-admin keeps on redirecting me to my live site or saying certain pages don't exist.
推荐答案我假设您已经将整个WordPress目录从Web服务器复制到本地MAMP文件夹.
I'm assuming you've already copied your entire WordPress directory from your web server to your local MAMP folder.
要处理数据库和URL,我发现最简单的方法是使用phpMyAdmin或类似的方法从您的Web服务器导出整个数据库,然后在导出的SQL文件上运行find and replace以替换您的旧url(www.yourwebsite/)和MAMP网址(localhost:8888/yourwebsite),然后运行SQL脚本在本地安装数据库(我使用SequelPro).
To take care of the database and URLs, I find it easiest to export the entire DB from your web server using phpMyAdmin or similar, then run find and replace on the exported SQL file to replace your old url (www.yourwebsite/) with your MAMP url (localhost:8888/yourwebsite) then run the SQL script to install the database locally (I use SequelPro).
更多推荐
如何使用Mamp将实时网站移至本地计算机
发布评论