This repository provides an easy way to run the composer configuration within a docker container:
- RUN
composer install - RUN
composer installagain - RUN
rebuild.bat/rebuild.sh - Open http://localhost
Once the containers have started, WordPress will be ready to use.
You can also run a copy of your live site to test updates for example:
- Download sql dump, place in
sqlfolder - Download current years upload folder and place in
uploads - RUN
composer install - RUN
composer installagain - Copy
vendor/interconnectit/search-replace-dbtowordpress/search-replace-db - RUN
rebuild.bat/rebuild.sh - (optional) Open db client and run:
DELETE FROM wp_posts WHERE post_type = "revision";
- Open http://localhost/search-replace-db/ and let it replace your prod url with http://localhost
- (optional) Create a new sql dump for further usage, replace your sql file in
sqlfolder - Open http://localhost/wp-admin/options-permalink.php and save (to create
.htaccess) - Open http://localhost
Depending on the size of your sql dump, probably you need to change the sleep time in rebuild.bat / rebuild.sh. This is because the WordPress container will "just" wait a couple of seconds for the database container to be available.