Skip to content

Nignx, PHP, MySQL, PHPMyAdmin env set up to run with WordPress

Notifications You must be signed in to change notification settings

denis-collette/docker-env-php-wordpress

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The Docker environment for WordPress

What is this ?

This template repository is a boilerplate setup for a PHP application.

Its current version ships with PHP 8.1, Mysql 8.0, phpMyAdmin and an Nginx server running on Alpine. All of it orchestrated and run by Docker Compose.

Requirements

Docker Engine and Docker Compose

How to use the template ?

Clone this repository, or click the Use this template button on Github. For more information about Github repositories, please refer to the Github documentation.

The entrypoint of your php application will be /src/public/.

For more info about this docker env, please refer to the README.md file provided in the phpdocker directory.

How to use with WordPress ?

The WordPress files can be downloaded on the official website here : https://wordpress.org/download/

Put the WordPress files in /src/public/.

Make a docker compose up -d & the docker env will start.

Link the database

The first thing to do is to create an empty database in your DB manager. Give it a name.

The next step is to go the file wp-config.php (or rename wp-config-sample.php) & write the correct info of your DB to be able to link it with WorkPress.

// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'database_name');

/** MySQL database username */
define( 'DB_USER', 'root' );

/** MySQL database password */
define( 'DB_PASSWORD', 'pass1234' );

/** MySQL hostname */
define( 'DB_HOST', 'mysql' );

👉 To allow plugins to be installed on Linux, you must write the following line in your wp-config.php file : define('FS_METHOD','direct');


Notes

The Docker Compose file was initially generated by phpdocker.io.

About

Nignx, PHP, MySQL, PHPMyAdmin env set up to run with WordPress

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dockerfile 100.0%