Grid Guide Topics
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
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.
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.
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
Migrating to a WordPress Photon
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
We will be transferring both folders to the /tmp folder like the image below
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.
The final step is to restart both our services. We do so by running the following.
We will see 2 containers. Keep track of their IDs because we will need them to start and stop the services.
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
You can now go to your WordPress website in your browser and you will your new migrated site.