A local/development Wordpress environment to peacefully prepare your future website.
A need to develop your WordPress site without updating your production environment, visible to all, and you do not have a test/staging environment with your web hosting. Use this repository to run a local environment with Docker, and once ready, put your site online thanks to the included database backup feature and the wordpress folder.
- Docker
- Docker-compose
Clone the repository and navigate to the project directory:
git clone <repository-url>
cd wordpress-devMake the script executable:
chmod +x wp-dev.shCopy the example environment file and customize it:
cp .env.example .envEdit the .env file to set your own database credentials and other configurations.
The wp-dev.sh script provides several commands to manage your local Wordpress environment:
./wp-dev.sh upThis command starts the Wordpress environment using Docker-compose.
Visit http://localhost:8080 to view your WordPress.
Visit http://localhost:8180 to view the phpMyAdmin interface.
./wp-dev.sh downThis command creates a backup of the database and stops the Wordpress environment.
./wp-dev.sh backupThis command creates a backup of the database without stopping the environment.
./wp-dev.sh restoreThis command restores the database from the backup file.
- Ensure Docker and Docker-compose are installed and running on your system. Personally I use Rancher Desktop.
- Modify the database credentials and other configurations in the
.envfile as needed.