Developers typically work on multiple servers or tiers to test tasks and ensure that errors do not occur in the actual production environment, and are ready to deploy code. WP engine provides multiple environments for each word press installation and provides multi-layer workflow. Developers can work on a separate development site until the code is ready to be shared with the client. The completed code can then be pushed to a dump for customer approval. If the customer logs out, GIT can be used to push the code to the WP engine user portal or command line in real time. The
This setting provides great flexibility and has the advantage of running all three tiers in the right environment to eliminate problems caused by version compatibility or configuration differences. The code is tested entirely on the same stack, so there is no reason to run on one layer and not on another. But there is a problem. Developers often work in a local environment as part of a daily workflow that occurs outside the WP engine environment. The problem is that in order to synchronize data between the two environments, the database needs to be exported \/ imported into other small renditions. The
In the last post, we learned how to configure the wp-cli alias to access local and remote servers using SSH. This post describes how to synchronize a local database to a remote site using the command line and wp-cli. In this case, the remote site is the production installation of WordPress running on WP engine, and the local installation is the copy of the site in MacBook Pro used to run the development of vv. OK, let’s go into the details. Wp-cli database command \
The function \
Export database the complete command to export a database from the production server is as follows: Export wp@prod db->prod.sql’wp@prod’specifies to run this WP cli command on the production server configured by the alias. The actual command is \
To import the live site URL import database correctly, you must change the site URL options stored in the wp\u options table
. The
So far, I hope it can help. In the near future, please pay more attention to my post.