如何镜像WordPress开发环境和实时站点? [英] How to mirror WordPress development environment and live site?

查看:63
本文介绍了如何镜像WordPress开发环境和实时站点?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当您具有使用WordPress(包括两个不同URL)的开发环境和实时环境时,最好的镜像方法是什么.

What's the best way to mirror, when you have a development environment and a live environment with WordPress (including two different URL's).

仅仅是通过备份一个环境(FTP->数据,SQL->数据库)并将其设置在另一环境上吗?

Is it simply by making a backup of one environment (FTP->Data, SQL->Database) and setting it up on the other environment?

推荐答案

制作Wordpress网站副本的最简单方法是使用

The easiest way to make a copy of a Wordpress site is to use a plugin like Duplicator. It handles everything from copying the files to updating the WP database with the new domain etc.

    在您要复制的网站上
  1. 安装插件(即您的开发环境)
  2. 构建程序包-这将创建包含站点数据库和文件的单个存档文件.取决于你主机设置,则在构建主机时可能会收到超时错误包裹.在这种情况下,我会排除上载文件夹,然后手动复制
  3. 复制归档文件&将安装程序安装到目标环境
  4. 为您的新站点创建一个空数据库
  5. 运行您上传到目标位置的installer.php .它将指导您输入新的数据库和域详细信息
  1. Install the plugin on the website you want to copy (i.e. your development environment)
  2. Build the package - this creates a single archive file with the site database and files. Depending on your hosting settings you might get timeout errors when building the package. In that case I exclude the uploads folder and then copy it across manually
  3. Copy the archive & installer to the destination environment
  4. Create an empty database for your new site
  5. Run the installer.php that you uploaded to the destination. It will guide you through entering the new database and domain details

就应该这样!您可能需要保存永久链接或进行其他调整,具体取决于您自己的设置,但这通常就这么简单.

And that should be it! You might need to save your permalinks or make some other tweaks depending on your own setup, but its usually that simple.

这篇关于如何镜像WordPress开发环境和实时站点?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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