WordPress support for the Aegir project (front-end module).
PHP JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Hosting WordPress

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.

See: https://www.drupal.org/node/1044692


  • 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').

Copy the 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

Enable the hosting_wpplatform and hosting_wpsite modules:

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.

Install wp-cli using composer (this should create a sylink in ~/.composer/vendor/bin/wp)

cd ~/
composer global require wp-cli/wp-cli

Alternatively, if wp is not found, add the composer path manually to your .bashrc:

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

See: https://github.com/mlutfy/hosting_wordpress/issues

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.


See: https://drupal.org/project/hosting_civicrm


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

Provision Wordpress
(C) 2015-2016 Mathieu Lutfy mathieu@symbiotic.coop

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
    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/>.