Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Docker environment for local Wordpress development

NotificationsYou must be signed in to change notification settings

bogkonstantin/wordpress-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

You needDocker to be installed with docker-compose.

Also, a WordPress backup plugin is needed. The plugin should download the database dump in SQL format and all necessary WordPress files.

I tested it withbackwpup plugin. With this plugin, you need to create a cron-job to generate backup files. Run job and download results.

Configuration

Clone this repository to the desired folder using the command below.

git clone git@github.com:bogkonstantin/wordpress-docker.git

Change PHP version indocker/php/Dockerfile if needed. Change MySQL version indocker-compose.yml if needed.

Copy website files to thewp folder.

Add towp-config.php local database connection values. See it in thedocker-compose.yml or override using the.env file.

Default parameters:

define('DB_NAME',"db" );define('DB_USER',"dbuser" );define('DB_PASSWORD',"pass" );define('DB_HOST',"db" );

Set domain to localhost inwp-config.php:

define('WP_HOME','http://localhost');define('WP_SITEURL','http://localhost');

Copy database dump todb_init folder.

Override config values in.env files if needed. See the list of available variables in thedocker-compose.yml file.

Usage

Use it with docker-compose commands. For example, start the application with the command:

docker-compose up -d

Stop application (containers) with the command:

docker-compose down

Now you can open your website locally using the linkhttp://localhost

Config Xdebug in your IDE if necessary.

Other

Feel free to contribute to this repository.

And don't forget to check your website availability withuptime.onl.

About

Docker environment for local Wordpress development

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp