GithubHelp home page GithubHelp logo

isabella232 / wordpress-heroku Goto Github PK

View Code? Open in Web Editor NEW

This project forked from 18f/wordpress-heroku

0.0 0.0 0.0 24.28 MB

Template project for deploying WordPress to Heroku

License: Other

ApacheConf 0.01% PHP 72.41% CSS 13.99% JavaScript 13.07% Ruby 0.01% HTML 0.52%

wordpress-heroku's Introduction

WordPress Cloud.gov

This project is a template for installing and running WordPress on Heroku. The repository comes bundled with:

Installation

  1. Clone the app (i.e. this repo).
git clone https://github.com/18F/cf-ex-wordpress.git cf-ex-wordpress
cd cf-ex-wordpress
  1. Create a service instance of a MySQL Database View Services
    cf marketplace
    View Specific Service Plans
    Template: cf marketplace -s SERVICE
    Example: cf marketplace -s mysql56
    Create Service Instance
    Template: cf create-service SERVICE PLAN SERVICE_INSTANCE
    Example: cf create-service mysql56 free mysql-service

  2. Create a service instance of S3 Template: cf create-service SERVICE PLAN SERVICE_INSTANCE
    Example: cf create-service s3service free SERVICE_INSTANCE

  3. Edit the manifest.yml file. Change the 'host' attribute to something unique. Then under "services:" change "mysql-service" to the name of your MySQL service. This is the name of the service that will be bound to your application and thus used by Wordpress.

  4. Deploy the app with a no start command cf push --no-start

  5. Set environment variables for secret keys using Wordpress Secret Key Generator

cf set-env mywordpress-new AUTH_KEY YOUR_KEY
cf set-env mywordpress-new SECURE_AUTH_KEY YOUR_KEY
cf set-env mywordpress-new LOGGED_IN_KEY YOUR_KEY
cf set-env mywordpress-new NONCE_KEY YOUR_KEY
cf set-env mywordpress-new AUTH_SALT YOUR_KEY
cf set-env mywordpress-new SECURE_AUTH_SALT YOUR_KEY
cf set-env mywordpress-new LOGGED_IN_SALT YOUR_KEY
cf set-env mywordpress-new NONCE_SALT YOUR_KEY
  1. Push it to CloudFoundry.
cf push

Usage

Because a file cannot be written to Cloud Foundry's file system, updating and installing plugins or themes should be done locally and then pushed to Cloud Foundry.

Updating

Updating your WordPress version is just a matter of merging the updates into the branch created from the installation.

$ git pull # Get the latest

Using the same branch name from our installation:

$ git checkout production
$ git merge master # Merge latest
$ git push heroku production:master

WordPress needs to update the database. After push, navigate to:

http://your-app-url.herokuapp.com/wp-admin

WordPress will prompt for updating the database. After that you'll be good to go.

Deployment optimisation

If you have files that you want tracked in your repo, but do not need deploying (for example, *.md, *.pdf, *.zip). Then add path or linux file match to the .slugignore file & these will not be deployed.

Examples:

path/to/ignore/
bin/
*.md
*.pdf
*.zip

Wiki

wordpress-heroku's People

Contributors

mhoofman avatar ibroadfo avatar mateusdelbianco avatar eddiejaoude avatar workman avatar adrianartiles avatar ericgj avatar andrewjanssen avatar andrewmunsell avatar jaxzin avatar gianpaj avatar justindthomas avatar marcocampana avatar mps avatar gaaady 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.