如何使用Mamp将实时网站移至本地计算机 [英] How do I move a live website to my local machine with mamp

查看:60
本文介绍了如何使用Mamp将实时网站移至本地计算机的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将网站从实时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(http://www.yourwebsite.com/)和MAMP网址(http://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 (http://www.yourwebsite.com/) with your MAMP url (http://localhost:8888/yourwebsite) then run the SQL script to install the database locally (I use SequelPro).

这篇关于如何使用Mamp将实时网站移至本地计算机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆