0

So I've worked with WP on many different occasions, but always either for a fresh install, or on a low-traffic live site with minor edits done in production.

I'm going to be working on an overhaul of a site that is currently live. What I'm doing is not only creating a new theme, but also overhauling almost all of the content. I'm essentially creating a new site on the same WP install.

If I was editing just the theme, I understand there are several ways to do this. However, for editing both theme and content while not disturbing a live site, what is the best way to go about this?

Thanks!

1
  • 2
    Pull it down locally and do the work there, or on another server, but how you do that, where you do that etc, are all going to differ depending on who you ask and your style of work. The only correct answer is to not do development in production – Tom J Nowell Jun 22 '17 at 13:36
3

You should never do work on a live site (of any size).

Copy the existing site to another server, give it a temporary domain and block search engines in some way (robots.txt, http auth, ...). Depending on the work you do, you could stay connected to the same MySQL server, but it is usually recommended to also copy the tables to another db.

Now you have an environment where you can do all your work without any fear that if anything breaks, the live site will suffer. Once you are finished, simply upload your themes and plugins to the live site, install them, et voilà.

You can even use the regular theme update method for custom themes not hosted in the official repository.

2
  • I've set up a local development environment. The current (live) site has a LOT of installed plugins. If I download both the WP files and copy the DB, that would effectively create an exact replica of the site to work on, correct? Or are there any other steps to take? – AKor Jun 22 '17 at 14:01
  • Yes, copying all files and the db (plus changing the wp-config.php) should be a good start. Then you need to change the site url, especially easy with WP CLI, for the local/dev version of WP to properly work – kero Jun 22 '17 at 14:54

Not the answer you're looking for? Browse other questions tagged or ask your own question.