fivefifteen / wordup
A WordPress Deployer Recipe.
0.0.7
2025-02-07 19:44 UTC
Requires
- php: ^8.1
- deployer/deployer: ^7.5
- mustache/mustache: ^2.14
- nette/php-generator: ^4.1
- paragonie/random-lib: ^2.0
- symfony/yaml: ^7.2
- wp-cli/wp-cli-bundle: ^2.11
README
WordUp
A WordPress Deployer Recipe.
Table of Contents
Requirements
- PHP 8.1 or above
- Composer
Installation
composer require-dev fivefifteen/wordup
Setup
To get started, copy examples/deploy.php and examples/deploy.yml into the root of your project. You'll then want to update both of those files to meet your needs.
Configuration
Configuration options can be defined/updated in either deploy.yml
or by using the add/set functions in deploy.php
.
WordUp uses Deployer and it's Common Recipe at it's core so you'll want to familiarize yourself with both of those.
Configuration Options
These are options that are custom to WordUp. See the source of recipe/wordup.php to view the default values (as well as any built-in Deployer options that WordUp modifies).
db/credentials
- A list of database credentialshost
- The database hostname
- The database nameuser
- The database usernamepass
- The database passwordprefix
- The database tables prefixcharset
- The database charsetcollate
- The database collate
db/exports_dir
- The name of the directory to save database exports todb/exports_path
- The remote path to save database exports todb/keep_exports
- If falsy, database exports will not be deleted from the remote server after downloadingdb/keep_local_exports
- If truthy, database exports will be deleted from the local environment after importingtemplates/files
- A list of.mustache
files to be renderedtemplates/temp_dir
- A temporary directory to store template files before uploading them to a remote serverwp/config/constants
- An associative array of constants to be defined inwp-config.php
wp/config/extra_php
- PHP code to be included inwp-config.php
wp/config/require
- A list of files to be required bywp-config.php
wp/content_dir
- The name of WordPress's content directorywp/content_path
- The remote path to WordPress's content directorywp/home
- The home URL for your WordPress websitewp/salts/temp_dir
- A temporary directory to store generated saltswp/siteurl
- The URL to the WordPress directorywp/uploads_dir
- The name of the WordPress uploads directorywp/uploads_path
- The remote path to the WordPress uploads directory
Tasks
Database Tasks
db:export
- Exports the local databasedb:import
- Imports a database export into the local databasedb:export:remote
- Exports and downloads the remote databasedb:import:remote
- Uploads a local database export and imports it into the remote databasedb:pull
- Pulls remote database to localhost (invokesdb:export:remote
anddb:import
)db:push
- Pushes local database to remote host (invokesdb:export
anddb:import:remote
)
Templates Tasks
templates:render
- Renders mustache template files
Uploads Tasks
uploads:pull
- Pulls uploads from remote to localuploads:push
- Pushes uploads from local to remoteuploads:sync
- Syncs uploads between local and remote
WordPress Tasks
wp:config:create
- Generates a wp-config.php filewp:salts:php
- Generates salts in PHP format and saves them to a filewp:salts:json
- Generates salts in JSON format and saves them to a filewp:salts:yml
- Generates salts in YML format and saves them to a file
Usage
dep <task> <stage>
Usage Examples
# Deploy to staging dep deploy staging # Export the database from production, download it, and import it into the local database dep db:pull production # Generate a wp-config.php file for my local environment dep wp:config:create localhost
License Information
MIT. See the license.md file for more info.