Wordpress Site Release Management Strategy

I am updating an existing Wordpress site , making significant changes to the theme and structure of the site, as well as updating plugins, which in turn store their data in the mysql database.

As far as I know, there are 2 (3?) Possible options here:

  • MySQL Dump-and-load database from DEV to LIVE and replacing the wp-content folder with the latest updates.
  • Import changes through the WP importer and replace the wp-content folder with the latest updates.
  • Make changes to the database manually through the WP admin interface and replace the wp-content folder with the latest updates (this is only useful for minor changes).

While I am developing in my own separate environment, this is for an existing website that is currently living and will continue to receive updates from the public, such as comments and posts, in contact forms, so I expect the database to be different from when I'm letting go of my changes.

The above options provide the following issues.

1. DUMP AND LOAD

The dump and load strategy seems out of the question since my data is being updated backstage (this would be my preferred approach since it is easy to roll back).

Result: you need to synchronize the databases after release in order to receive the latest updates, TOO FIT.

2. USE IMPORT

Using the WP-Importer plugin and updated message identifiers will be updated, screwing a style that depends on the message identifiers to activate them. This, in turn, creates a CSS nightmare that I want to avoid, I have to go through CSS after release to update the new page / post IDs with the ones the database created.

Result: too complex, not very professional approach, leading to a long and complicated release process.

3. DATABASE UPDATE STRONG

This option is great for small changes, but when for more complex releases the list of steps to follow on the PROD interface becomes long and difficult to complete, making mistakes easy.

Result: Too easy to screw in, only as a last resort.

IS A STANDARD STRATEGY FOR STRATEGIC PERMISSION FOR EXISTING WEBSITES?

So, basically, my question is: what is the release process that other Wordpress developers are doing following the upgrade of an existing website? Is there an option that I have not listed below that minimizes problems and reduces time and complexity during release?

I installed the control source for the site using GIT, and I'm used to automating things through ANT or a similar version of the script, this may be redundant for the current project, but it will be ideal at least to know an easy way to update the wordpress site and minimize the chance of screwing it .

Thanks!

+7
source share
3 answers

I don’t think this is especially true for WordPress, it is like any custom site. I personally prefer to rename the SQL changes during production that were made to dev. The hard part is that you need to know what SQL changes have been made. For example, a certain plug-in may make some changes to the circuit when it is installed - you need to know what they are. You can do this by creating an export of your database as SQL before installing the plugin, then do another export after and do diff for the files.

Since you say you are making changes, I can assume that you know what SQL changes you are going to make? Just make sure that all the changes you make to the database are presented as SQL script files, not just editing using the graphical interface (you can use the graphical interface to help you write queries, but save the actual SQL). After all your changes are completed, you should have a bunch of SQL scripts that you ran during the development process - you can re-run them in order without encountering errors.

Then, when you need to click on production, create an intermediate version of the product (that is, take a fairly current database backup). Run update scripts and check if everything is ok. If so, then you can work in production.

Be sure to back up the product before launching any changes on it!

+2
source

Needless to say, you have other options. If you make changes to the database manually, make sure that you are working effectively with serialized data. I recommend using DB Search and Replace . WordPress also had a great trick for changing the site URL completely from the wp-config file .

+2
source

I assume that everything works for you in a test environment. Then I:

  • Create a new database in your environment.
  • Preload it with all the content and configurations for the new site.
  • In a test environment, configure config.php to point to the new database.
  • Upload all files to a live server. Download the latest config.php file.

This minimizes downtime.

+1
source

All Articles