简体   繁体   中英

docker wordpress custom theme

I'm very new on Docker. I'm trying to create a docker container: wordpress - mysql image. I can make it run as shown in tutorial (with a docker-compose.yml) that fetches the latest versions of the packages.

But now I want to customize my wordpress code. Where should I do that? What's the flow to make docker-containers for wordpress (or Laravel projects)?

To start, you can mount a local version of the wp-content directory to your container. This will make that content persist instead of being destroyed whenever your container is ever removed.

If you're using a docker-compose.yml file, this is as simple as adding a line like this:

 volumes:
   - ./wp-content:/var/www/html/wp-content

Then, if you want to beef things up a bit, you could use Composer to define any plugin dependencies, and run composer install to install them.

You can see an example of this setup here:

https://github.com/alexmacarthur/wp-skateboard

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