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

multisite - Two WordPress sites sharing the same database

programmeradmin1浏览0评论

Here is what I'm looking to do. I would like to set up two WordPress sites. The one site will be the production and the other site will be the staging.

What I'm trying to accomplish is to have the main site be used for production only, and the staging for development changes to make sure it works with the current data.

Here is what I'm looking to do. I would like to set up two WordPress sites. The one site will be the production and the other site will be the staging.

What I'm trying to accomplish is to have the main site be used for production only, and the staging for development changes to make sure it works with the current data.

Share Improve this question edited Aug 5, 2019 at 15:47 Nicolai Grossherr 18.9k8 gold badges64 silver badges109 bronze badges asked Aug 5, 2019 at 15:06 Kevin DavisKevin Davis 232 bronze badges 2
  • 2 You definitely could do this, but no good can come from combining the databases. Keep them separate. – rudtek Commented Aug 5, 2019 at 15:25
  • Yes, nogood. Look for the Plugin: WP-Staging, it can do what you want to do. – user3135691 Commented Aug 5, 2019 at 15:26
Add a comment  | 

1 Answer 1

Reset to default 4

You won't be able to use the same database. If you do your going to have all sorts of problems. With the biggest problem being you cannot have two different values for the site URL.

I would suggest a managed hosting solution such as Pantheon. This will provide you with a development, test, and live environment.

All code updates are made in your development environment. From there you deploy those changes to the test environment.

When deploying to the test environment, there is an option to pull in the database and media files from the live environment.

After thoroughly testing everything in the test environment. You'll deploy your changes to the live environment.

If everything was working in the test env. You can be certain that you didn't introduce any bugs in the live environment after you deployed.

The nice thing about Pantheon is you can spin up a new sandbox site for free. Once your ready to launch. You'll obviously have to switch to a paid plan.

If Pantheon is out of the question. I recommend recreating a similar workflow with your current hosting provider.

Let me know if you have any questions.

发布评论

评论列表(0)

  1. 暂无评论