Skip to content

Instantly share code, notes, and snippets.

@jasonagnew
Last active August 29, 2015 14:03
Show Gist options
  • Save jasonagnew/dcf10a55baa2d16b5614 to your computer and use it in GitHub Desktop.
Save jasonagnew/dcf10a55baa2d16b5614 to your computer and use it in GitHub Desktop.
Wordpress Server

Server Requirements

  • Apache
  • PHP 5.5
  • MySQL
  • Varnish 4
  • SSH
  • libssh2-php or FTP
    • Used by wordpress for updating.
    • libssh2 allows us to use SSH for updates
    • But FTP can be used instead.

Connection / Deployment Details

We generally prefer to set up a git remote for deployment. If you could provide us with SSH access we can configure this, or if you prefer to do this on our behalf that's great. We like to deploy using this folder structure:

gulp/
  ...
public/   <--- This is the public / root of the domain name.
  ...
src/
  ...

Varnish 4 Config


# Drop any cookies sent to Wordpress.
sub vcl_recv {
        if (!(req.url ~ "(preview=true|wp-login|wp-admin)")) {
                unset req.http.cookie;
        }
}

# Drop any cookies Wordpress tries to send back to the client.
sub vcl_backend_response {
  if (!(bereq.url ~ "(preview=true|wp-login|wp-admin)")) {
              unset beresp.http.set-cookie;
      }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment