A sample initialization project for WordPress website
This repository is an empty wordpress project that can be used to start a new website. It also contains some tools to help project industrialisation (deployment, testing, content manipulation...).
To start a new project using this barebone one, you just need to run :
composer create-project chstudio/wordpress-project [path] [version]
[path]is the path to the installation directory, if not defined, a
wordpress-projectfolder will be created in your current path.
[version]is the version of the project to use when installing, if not defined, the more recent stable is used, else you can use :
You can also use a simple
git clone :
git clone https://github.com/CHStudio/wordpress-project.git
To configure database credentials and all the others settings, you can rely to command parameters or create a specific
wp-cli.local.yml file at project root.
You must check the WP-CLI configuration handbook for more details.
Example of local configuration :
path: public/wp-cms color: true core install: title: "WordPress Project !" url: http://wordpress-project.dev admin_user: stephane admin_email: email@example.com core config: dbuser: root dbpass: mypass dbname: my_database extra-php: | define( 'WP_DEBUG', true ); define( 'WP_POST_REVISIONS', 50 );
Beware, never add your
wp-cli.local.yml file to Git, it may contains sensitive information.
This project rely on WP-CLI to perform common tasks.
To install your local environment you must run the following commands :
bin/wp core download bin/wp core config bin/wp core install mv public/wp-cms/wp-config.php public
If your local configuration is not defined, you must pass all the required parameters. You can get more details by
--help flag on each command (will display parameters and command description).
If you haven't defined it, the
core install will prompt the generated administrator password, you'll be asked to change it
after your first admin panel login.
The last one moves the generated configuration file to your project public root. It's mandatory to use the
public/wp-content folder as code container.
When the execution has succeded, you can access your local installation.
You can review some details about this project philosophy here (french) : http://www.24joursdeweb.fr/2014/comment-bien-versionner-son-site-wordpress-avec-git-et-github/
We welcome everyone to contribute to this project. Below are some of the things that you can do to contribute.