EXPERIMENTAL work in progress. Use at your own risk.
This module is not officially supported. No security announcement will be published if an issue is found. See 'support' for more information.
- Operating system: Debian GNU/Linux Jessie 8.x
- Web server: nginx or Apache 2.4+
- Aegir 3 (7.x-3.x)
Other environments are non-tested and may not work (but you are most welcomed to debug it and send a patch).
IMPORTANT: run all the following commands as the 'aegir' user ('sudo -i -u aegir' or 'su -c /bin/bash aegir').
hosting_wordpress module in your ~/hostmaster-7.x-3.x/sites/example.org/modules directory:
cd ~/hostmaster-7.x-3.x/sites/example.org/modules/ git clone https://github.com/mlutfy/hosting_wordpress.git
drush @hostmaster en hosting_wpsite
Run a 'verify' task on the Hostmaster so that Aegir does the magic include in
~/.drush/drushrc.php (c.f. do#2300537):
drush @hostmaster provision-verify
Make sure your Aegir user has a
~/.profile file, so that the .bashrc is read when using
sudo -i -u aegir:
cp -i /etc/skel/.profile ~/
Composer adds its 'bin' directory to the $PATH, which makes it possible to use the 'wp' command easily.
wp-cli using composer (this should create a sylink in
cd ~/ composer global require wp-cli/wp-cli
wp is not found, add the composer path manually to your
echo 'export PATH="$PATH:$HOME/.composer/vendor/bin"' >> ~/.bashrc
Finally, apply the patch included in the patches directory (until https://www.drupal.org/node/2763509 is merged).
How to test
- Create a new platform on your filesystem, ex: mkdir /var/aegir/platforms/wordpress-4.5/; cd /var/aegir/platforms/wordpress-4.5/; wp core download
- Create a new WP Platform (node/add/wpplatform)
- Create a new WP Site from there.
- Access the URL of your new site.
- You can also use wp-cli in a site context, using, for example: "drush @mysite.example.org wp user list"
TODO and known bugs
How it works
provision_wordpress and hosting_wordpress implement new entities for the 'wpplatform' and 'wpsite' (highly inspired from 'platform' and 'site').
while it would be great to re-use the platform/site from Aegir, they make too many assumptions related to Drupal.
wpplatform verify creates a platform/example/wp-config.php file based on wp-config-sample.php, but uses the vhost variables so that we can install multiple sites in the same platform.
This module is not currently supported. Feel free to send patches using the issue queue on github.
Commercial support is available through Coop SymbioTIC:
Or contact one of the Aegir service providers:
Copyright and license
(C) 2015-2016 Mathieu Lutfy email@example.com
Distributed under the terms of the GNU Affero General public license v3 (AGPL).
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.