Download the PHP package digitalerase/deployer-extended-wordpress-composer without Composer

On this page you can find all versions of the php package digitalerase/deployer-extended-wordpress-composer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package deployer-extended-wordpress-composer

deployer-extended-wordpress-composer

:local:

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 expected to be compatible with composer based WordPress projects based on https://roots.io/bedrock/

Dependencies

This package depends on following packages:

Installation

1) Install package with composer:

composer require digitalerase/deployer-extended-wordpress-composer

2) If you are using deployer as phar then put following lines in your deploy.php:

require_once(__DIR__ . '/vendor/digitalerase/deployer-loader/autoload.php');
new \SourceBroker\DeployerExtendedWordpressComposer\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:

<?php

namespace Deployer;

require_once(__DIR__ . '/vendor/digitalerase/deployer-loader/autoload.php');
new \SourceBroker\DeployerExtendedWordpressComposer\Loader();

set('repository', 'git@my-git:my-project.git');

host('development')
    ->set('public_urls', ['https://example.test/'])
    ->set('deploy_path', getcwd());

host('staging')
    ->setHostname('111.111.111.111')
    ->setRemoteUser('www-data')
    ->set('branch', 'staging')
    ->set('public_urls', ['https://www.example.staging.com/'])
    ->set('deploy_path', '/var/www/example.staging.com');

host('production')
    ->setHostname('111.111.111.111')
    ->setRemoteUser('www-data')
    ->set('branch', 'master')
    ->set('public_urls', ['https://example.com/'])
    ->set('deploy_path', '/var/www/example.com');

Mind the declaration of host('dev'); Its needed for database tasks to declare domain replacements, and path to store database dumps.

Synchronizing database

Database synchronization is done with `digitalerase/deployer-extended-database`. Example of command for synchronizing database from production to local instance:

dep db:pull production

You can also copy database from production to staging instance like:

dep db:copy production --options=target:staging


Domain replacement ++++++++++++++++++

The "post_command" task "db:import:post_command:wp_domains" will change domains declared in "public_urls". Domain replacement is done with cli command "search-replace" from wp-cli/wp-cli.

Please mind to have the same amount of "public_urls" for each of instances because replacement on domains is done for every pair of corresponding urls.

Look at following example to give you idea:

host('development')
    ->set('public_urls', ['https://example.test', 'https://sub-example.test'])
    ->set('deploy_path', getcwd());

host('staging')
    ->setHostname('111.111.111.111')
    ->setRemoteUser('www-data')
    ->set('public_urls', ['https://example.staging.com', 'https://sub-example.staging.com'])
    ->set('deploy_path', '/var/www/example.staging.com');

host('production')
    ->setHostname('111.111.111.111')
    ->setRemoteUser('www-data')
    ->set('public_urls', ['https://example.com', 'https://sub-example.se'])
    ->set('deploy_path', '/var/www/example.com');



The if you will do:

dep db:pull production

the following commands will be done automatically after database import:

wp search-replace https://example.com https://example.test
wp search-replace https://sub-example.com https://sub-example.test

Should I use "deployer-extended-wordpress" or "deployer-extended-wordpress-composer"?

In digitalerase/deployer-extended-wordpress the WordPress and third party plugins are installed manually. What you have in git is basically only your theme. 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 digitalerase/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).


All versions of deployer-extended-wordpress-composer with dependencies

PHP Build Version
Package Version
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package digitalerase/deployer-extended-wordpress-composer contains the following files

Loading the files please wait ....