pierre-dargham/classicpress-composer-boilerplate

0.3.0 2018-12-04 13:05 UTC

This package is auto-updated.

Last update: 2024-04-05 01:21:54 UTC


README

Latest Stable Version License

ClassicPress composer boilerplate

This boilerplate shows the minimal steps required to start a composer project based on ClassicPress.

Default dependencies are ClassicPress core last release and Twenty Seventeen theme.

Requirements

Installation

  1. Run in command line : composer create-project --remove-vcs pierre-dargham/classicpress-composer-boilerplate my-project
  2. Create an empty database
  3. In wp-config.php, edit following constants : WP_HOME, DB_NAME, DB_USER, DB_PASSWORD, DB_HOST
  4. Go to your site home url, and follow standard ClassicPress install steps

Note: Your site administration area will be available at /classicpress/wp-admin/ instead of /wp-admin/

Further steps

Versionning

If you are using a VCS, like git or svn, you should ignore those files :

- /vendor
- /classicpress
- /wp-content/themes/twentyseventeen

WordPress plugins and theme

You can install and manage WordPress plugins and theme using composer, thanks to composer miror repository wpackagist. If you require WordPress plugins and theme using composer, you should ignore them in your VCS also, like any other dependency.

Automatic updates

Automatic updates are disabled by default in this boilerplate wp-config.php, because your dependencies updates should be handled using Composer. If you need to change that, you can modify the two following constants :

/* Automatic updates */
define('WP_AUTO_UPDATE_CORE', false);
define('AUTOMATIC_UPDATER_DISABLED', true);

Nightly builds

If you want to install ClassicPress nightly builds instead of stable releases, you can modify the composer.json file :

  • Add "minimum-stability" :"dev"
  • Add the following repository : "type": "vcs", "url": "ssh://git@github.com/ClassyBot/ClassicPress-nightly.git"

You should now have a section like that :

"minimum-stability" :"dev",
"repositories": [
    {
        "type": "composer",
        "url": "https://wpackagist.org"
    },
    {
        "type": "vcs",
        "url": "ssh://git@github.com/ClassyBot/ClassicPress-nightly.git"
    }
],
  • Run composer update classicpress/classicpress to install the last nightly build

Related links