Grid Guides

Explore How System On Grid Can Work For You

How to Migrate a WordPress Website to a WordPress Photon


Introduction

Most of the time, when creating a WordPress photon, you wish to migrate your old website to our servers. This guide will show you how.

  • Running Orbit with WordPress Photon

Backing up your old WordPress website

  1. Backing up a WordPress site is as easy as replacing 2 folders. We will need to copy the WordPress data folder and the MySQL database folder. You will need to find out where exactly your WordPress data folder is before you can proceed.

  2. Using a FTP program like Filezilla, connect to the old server and locate the WordPress folder. Our folder is located in the /var directory shown in the image below. Copy the WordPress folder and store it to your local harddrive.

    WordPress Filezilla
  3. Now locate the MySQL folder which you will need as well. In this case it was located in the /var/mysql/data folder as shown below. Copy the wordpress folder and save it somewhere safe as well and rename it to wordpress_mysql

    MySQL Filezilla

Migrating to a WordPress Photon

  1. Now once again using an FTP program, connect to your new photon using port 22 which is for FTP through SSH. An example is shown below

    Filezilla Connect
  2. We will be transferring both folders to the /tmp folder like the image below

    Filezilla tmp
  3. Once transferred we need to connect to our orbit so we can move the folders to the appropriate locations. Run the following commands once you have SSH'd into your server.

    sudo rm -rf /var/wordpress
    sudo rm -rf /var/mysql/data/wordpress
    sudo mv /tmp/wordpress /var/
    sudo mv /tmp/wordpress_mysql /tmp/wordpress
    sudo mv /tmp/wordpress /var/mysql/data

    These commands remove the old wordpress data folder and database folder, moves the wordpress data from the temp location to where its supposed to go and after renaming the wordpress_mysql back to wordpress, it moves that folder back to the mysql data folder.

  4. The final step is to restart both our services. We do so by running the following.

    docker ps
    Docker PS

    We will see 2 containers. Keep track of their IDs because we will need them to start and stop the services.

  5. Run the following commands for both containers replacing both IDs with their corresponding ones.

    docker stop ID
    docker start ID

    So in this case it would be.

    docker stop f4673941a04d
    docker start f4673941a04d
    docker stop f8b08bab4687
    docker start f8b08bab4687
  6. You can now go to your WordPress website in your browser and you will your new migrated site.

    WordPress Migrated