MoveDockerWordpressToNewServer

Enter a topic name to show or a new topic name to create; then press Enter

Preparation Steps on Original Server

There are a number of steps that should be performed on the original server to ensure that the move to the new server is as quick as possible. This is very important when moving to the production environment so that downtime can be minimized to less than 1 minute.

The basic steps are summarized here with the detailed commands following:

  1. Shutdown the web docker container on the original server.
  2. Start MySQL Workbench on the original server.
  3. Edit the wp_options for siteurl and home so that they match the hostname of the target server
  4. Close MySQL Workbench
  5. Shutdown the mysql docker container on the original server
  6. Copy the wp_docker directory in /root/Downloads to a USB drive

The detailed steps to prepare for the move are:

docker stop wpdocker_web_1
docker stop wpdocker_mysql_1

Run Docker Wordpress on the New Server

The summary of steps on the new server to get Wordpress running are:

  1. Copy the directory wp_docker from the USB drive to a staging directory on the new server, e.g. /root/Downloads/staging
  2. If there is a an existing Wordpress docker installation running on the target server, then shut down the wordpress and mysql docker containers
  3. Remove the directory /root/Downloads/wp_docker and all its contents
  4. Move the wp_docker directory from the staging position to the /root/Downloads directory
  5. In a root command prompt change directory to /root/Downloads/wp_docker
  6. Start the wordpress and mysql docker containers using the docker-compose file.

The detailed steps for the move and activation are as follows:

docker stop wpdocker_web_1
docker stop wpdocker_mysql_1
rm -Rf /root/Downloads/wp_docker
mv /root/Downloads/staging/wp_docker /root/Downloads/wp_docker
cd /root/Downloads/wp_docker
docker-compose up -d

Version: 9   Revised: 2015-12-20 10:19:44 Last Updated by: 2001:470:b0ad:1:e5b6:2d69:3897:336a Rename Show Links to Topic