Docker Community Forums

Share and learn in the Docker community.

MIgrate Wordpress site and MySQL database to Docker containers

I have several Wordpress sites running on SUSE Linux Enterprise servers with the MySQL, also running on SUSE, databases running on a separate server. I need to migrate these over to a Red Hat 7 server and instead of standing up new RHEL servers I was investigating and going to attempt to run everything on 1 RHEL server running as a VM on VMware. I was reading this article - which started me down this path. I was able to install the nginx proxy and get 4 generic Wordpress sites up and running. My problem is I need to migrate my current Wordpress sites and databases and not sure how to do that. I was going to try the Wordpress Duplicator plugin but I couldn’t get the exported Duplicator files over to run the installer.php file to import everything. I then ran a mysqldump on my database and then changed the URL’s and tried to dump the updated .sql file file into the MySQL/Mariadb database. That didn’t appear to work nor coping over my Wordpress directory.

Is there a document or easy to follow instruction or tool :slight_smile: that can help migrate Wordpress sites, content and databases, to make them all containers? It just feels like a better use of system resources not to mention the cool factor. Today, we are not running any containers and this would be a great start. Once I get this figured out the MediaWiki sites will be next. I would like to run all these little web applications inside of Docker on a single, beefy in need be, RHEL 7 server.

I have been trying to get this accomplished for almost a week but the items above I tried I can’t seem to get all the puzzle pieces to work out. I am also very new to containers but have learned quite a bit in this week.

Any and all suggestions and help is greatly appreciated!

If your containers are up and running, this seems like a Wordpress, not a Docker question to me. Did you read ‘Moving to a New Server’ in the Wordpress docs?

I guess my biggest issues are importing the database dump, sql file and getting the themes lined up right. I am trying to get the Duplicator plugin to work but no dice. I’ll go look on their support forums and see if I can get some help.

Did you try to backup and restore with UpdraftPlus?