简体   繁体   中英

How to set up Docker file with an existing WordPress site

I'm new to Docker and I've always used Xampp while developing my WordPress themes and plugins locally on my Mac.

But recently I needed to test a client's WordPress site with multiple php versions. He wants to know if the site won't break after switching to php 8. With Xampp, that would be a nightmare.

I heard that Docker would be a good tool for me to test that scenario, but I'm really struggling to understand how to work with Docker and an existing WordPress local site. All tutorials I find is about using Docker to deal with fresh WordPress installations. There are a couple of answers here on StackOverflow, but they also don't help me.

Can someone please guide me on how to setup a yml file or even help me find a good tutorial on how to do what I want to do? I've been googling for 2 days now, but I can't find a suitable solution for my issue (maybe I'm not using the right keywords).

Anyway, any tips you can give me would be greatly helpful, cause I'm totally lost. Thanks.

The way i try these things out, is setting up an online staging site. You copy the files and database from the site you want to test and transfer it to lets stay stagingyourdomain.com.

Then switch the php versions and test out if it works.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM