PHPackages                             sourcebroker/deployer-extended-wordpress - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [DevOps &amp; Deployment](/categories/devops)
4. /
5. sourcebroker/deployer-extended-wordpress

ActiveLibrary[DevOps &amp; Deployment](/categories/devops)

sourcebroker/deployer-extended-wordpress
========================================

Deployment for WordPress with deployer.org.

6.0.0(3y ago)232.8k6MITPHP

Since Jun 22Pushed 1y ago5 watchersCompare

[ Source](https://github.com/sourcebroker/deployer-extended-wordpress)[ Packagist](https://packagist.org/packages/sourcebroker/deployer-extended-wordpress)[ RSS](/packages/sourcebroker-deployer-extended-wordpress/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (7)Versions (30)Used By (0)

deployer-extended-wordpress
===========================

[](#deployer-extended-wordpress)

- [What does it do?](#what-does-it-do)
- [Should I use "deployer-extended-wordpress" or "deployer-extended-wordpress-composer"?](#should-i-use-deployer-extended-wordpress-or-deployer-extended-wordpress-composer)
- [Dependencies](#dependencies)
- [Installation](#installation)
- [Project's folders structure](#project-s-folders-structure)
- [Composer](#composer)
- [Synchronizing database](#synchronizing-database)
    - [Domain replacement](#domain-replacement)
    - [Configuration](#configuration)
- [Synchronizing media &amp; WordPress / plugins code](#synchronizing-media-wordpress-plugins-code)

[What does it do?](#id3)
------------------------

[](#what-does-it-do)

This package provides deploy task for deploying WordPress with deployer (deployer.org) and additionally a tasks to synchronize database and media files.

The deployment is simplified in order to have ability to auto-upgrade WordPress and upgrade plugins manually by admin panel (or automatically with tools like InfiniteWP). This is a half way between no deployment at all and deployment fully driven by composer. If you want to manage WordPress and plugins fully with composer then check  and [sourcebroker/deployer-extended-wordpress-composer](https://github.com/sourcebroker/deployer-extended-wordpress-composer).

[Should I use "deployer-extended-wordpress" or "deployer-extended-wordpress-composer"?](#id4)
---------------------------------------------------------------------------------------------

[](#should-i-use-deployer-extended-wordpress-or-deployer-extended-wordpress-composer)

In [sourcebroker/deployer-extended-wordpress](https://github.com/sourcebroker/deployer-extended-wordpress) the WordPress and third party plugins are installed manually. What you have in GIT is basically only your theme/plugins/muplugins. The good thing is that in such case you can update WordPress and plugins automatically. This can be considered as preferable for low budget WordPress websites.

In [sourcebroker/deployer-extended-wordpress-composer](https://github.com/sourcebroker/deployer-extended-wordpress-composer) the WordPress and third party plugins are installed using composer. This way you gain more control over what is installed but at the same time to install new WordPress or new plugin version you need first to modify composer.json or do composer update (depending how big upgrade you do). Then you need to commit composer.json / composer.lock and do deploy which will install new version of WordPress and plugins. This is additional work that can not be easily automated. One of additional advantages of this solution is that you can easily cleanup infected WordPress/plugins files as with each deployment all php files are fresh (part from your GIT and part from composer repositories).

[Dependencies](#id5)
--------------------

[](#dependencies)

This package depends on following packages:

- [sourcebroker/deployer-extended](https://github.com/sourcebroker/deployer-extended)

    Package which provides some deployer tasks that can be used for any framework or CMS.
- [sourcebroker/deployer-extended-database](https://github.com/sourcebroker/deployer-extended-database)

    Package which provides some php framework independent deployer tasks to synchronize database.
- [sourcebroker/deployer-extended-media](https://github.com/sourcebroker/deployer-extended-media)

    Package which provides some php framework independent deployer tasks to synchronize media.
- [wp-cli/search-replace-command](https://github.com/wp-cli/search-replace-command)

    Package to change domains after database synchronization. Part of wp-cli/wp-cli utility.

[Installation](#id6)
--------------------

[](#installation)

1. Install package with composer:

    ```
    composer require sourcebroker/deployer-extended-wordpress
    ```
2. Put following lines in your deploy.php:

    ```
    require __DIR__ . '/vendor/autoload.php';
    new \SourceBroker\DeployerExtendedWordpress\Loader();
    ```
3. Remove task "deploy" from your deploy.php. Otherwise you will overwrite deploy task defined in deployer/deploy/task/deploy.php
4. Example deploy.php file:

    ```
