Skip to content

lucatume/composerpress

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#ComposerPress

Composer-managed WordPress installation.

The problem

I need a way to quickly deploy WordPress sites along with my favourite plugins and starter themes, put that site under control to manage it in a controlled and clonable way. To do that I took my inspiration from an article by Smashing agazine and created my version of it.

The solution

Supposing git and composer globally installed already cd to the hosts folder or choice, mine is /www, and create a folder to host the development version of the site

cd /www
git clone https://github.com/lucatume/composerpress.git local-site

where local-site is a name of your choice then either run install.sh

cd local-site
chmod +x ./install.sh
./install.sh

or manually do what the script would do

rm .git
composer install
git init

The folder contains a .gitignore file as well: do not remove as it packs many ignore statements that will allow development and independent tracking of themes and plugins without circular dependency. Finally set the wp-config.php file according to your hosting solution fo choice.

Installing and removing themes and plugins

To keep track of themes and plugins installed and removed from the site installation and to allow proper firing of activation, deactivation and uninstallation hooks follow this steps to install

  1. add dependency in composer.json require statements
  2. run composer update
  3. activate the plugin/theme on the site

To uninstall a plugin or theme:

  1. deactivate theme or plugin on the site
  2. remove the plugin/theme from the site via the admin interface
  3. remove dependency from composer.json file
  4. run composer update

About

Composer-managed WordPress installation.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published