GithubHelp home page GithubHelp logo

thinkryan / capistrano-wordpress-multisite Goto Github PK

View Code? Open in Web Editor NEW

This project forked from anthonyscolaro/capistrano-wordpress-multisite

0.0 1.0 0.0 156 KB

WordPress Multisite deployment

License: GNU General Public License v2.0

Ruby 89.53% Shell 10.47%

capistrano-wordpress-multisite's Introduction

capistrano-wordpress-multisite

WordPress Multisite Deployment

This is the first time I've used github for anything so let me know if I should have set something up differently...

I've been meaning to write up a generic version of a deployment recipe I've been adding onto for some time. At the time of writing this, I'm using a variation of it for each of the three WordPress Multisites that I manage.

You can use this to:

  1. Deploy Wordpress core files, themes and plugins to multiple environments (I'm using only production and staging)
  2. Rsync shared data from production to staging or staging to local development
  3. Pulldown the MySQL database from Production to Staging or from Staging to Local Development

I've set it up so that the local developer can only grab shared files and database from staging for security purposes. This is because I'm not always developing from a static IP address and like to restrict access to the production sever. The staging server is only used by developers with no public host.

deploy.rb

The deploy.rb contains instructions for quite a few symlinks to be created. This keeps certain plugin confurations and uploads out of the codebase. This was originally written for Apache but was later modified for NGINX and there is some evidence of Apache that needs to be better separated.

Replace your default deploy.rb file that is created after running 'capify .' with the deploy.rb located in my config file. Edit the standard variables (application, stages, scm, user and group). Read through each task as you may find that there are some extras that are applicable to your Multisite installation.

Once the symlinks are finished being created, we edit ownership and permissions before reloading NGINX.

production.rb

The recipe has 3 purposes, deploy to the production server, pulldown the database to the staging server or rsync shared data from production to staging.

To deploy to production run cap production deploy

To dump the production database, compress, sftp it to staging, decompress and import it into your staging database (whew), run cap production importdbstaging

To rsync production shared data, excluding the wp-config.php and a couple other things, run cap production rsyncsharedstaging

staging.rb

This recipe is almost exactly the same as production.rb except that instead of pushing data from production to staging, we are pushing it from staging to local development.

To deploy to staging run cap staging deploy

capistrano-wordpress-multisite's People

Contributors

anthonyscolaro avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.