如何为发展目的克隆wordpress网站

如何为发展目的克隆wordpress网站

本文介绍了如何为发展目的克隆wordpress网站?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个wordpress网站,我必须经常进行修改,所以我想创建该网站的克隆以进行测试,因为我想先进行几天的修改测试,然后再将其放在网站上。 / p>

到处都有指向真实网站的链接,所以我不确定该怎么做。



更新(改进的解释):



问题:


  1. 链接是绝对的


  2. 此链接必须在线,以便其他开发人员可以测试站点



解决方案

将整个文件从域复制/粘贴到您想要的任何地方。



转到phpMyAdmin或使用允许您将数据库导出为 .sql 的工具。



打开.sql文件并运行查找并替换所有您的绝对路径(恰好是wordpress之前的路径:即该。仅替换



检查数据库的权限,也许您还应该更改服务器名称,数据库名称,用户名和密码。



创建一个新数据库并



现在,您已经获得了以前网站的克隆,可以在文件和数据库两方面进行实验了。

>

I have a wordpress site and I have to do modifications very often so i would like to create clone of that website for testing because i would like to test my modification first for a few days before i put them on my site.

There are links to the "real" site everywhere so i'm not sure how to do that.

UPDATE (improved explanation):

Problems:

  1. links are absolute

  2. this need to be online so other developers can test site

解决方案

Copy/paste your entire files from your domain to everywhere you want as first step.

Go to the phpMyAdmin or use a tool that permit to you to export your database as .sql.

Open the .sql file and run a find and replace and replace all your absolute path (just the one before wordpress: ie.: of this http://www.yoursite.com/wp-content/etc. Replace only http://www.yoursite.com)

Check for the permission of the DB, maybe you should change also the Server name, DB Name, Username and Password.

Create a new database and import the file you exported and modified the minute before.

Now you got a clone of the previous website ready for your experiments on both side, files and DB.

这篇关于如何为发展目的克隆wordpress网站?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-06 00:30