Git Product home page Git Product logo

wordpress-skeleton's Introduction

WordPress Skeleton

Customized fork of Mark Jaquith's WordPress Skeleton package. See the upstream documentation for base details.

Customizations

  • Environment-specific config values (database credentials, table prefix, salts, etc) stored in a single, unversioned /environment-config.php instead of using separate files for development/staging/production. This keeps the shared configuration values versioned in wp-config.php, but lets each installation change the values that are specific to it. It also makes sure that the production database credentials are never versioned.
  • WordPress core stored in /wordpress/ instead of /wp/.
  • .htaccess rewrite rules for /wordpress/wp-admin/ and /wordpress/wp-includes/ so they can be accessed from /wp-admin/ and /wp-includes/.
  • .htaccess rewrite rules for all root-level .php files to live in /wordpress/, but still be accessed from /
  • /content/uploads symlink replaced with actual directory
  • Instead of manually symlinking themes from /content/themes/ to /wordpress/wp-content/themes/, /mu-plugins/wordpress-skeleton-functionality.php registers /wordpress/wp-content/themes/ as an additional theme directory. Kudos to Rarst for the idea.
  • WordPress-Functionality-Plugin-Skeleton added as a Git submodule
  • .gitignore pruned for unnecessary entries

Installation

This assumes httpdocs directory is empty.

  • cd /var/www/vhosts/example.com/httpdocs
  • git clone --recursive git://github.com/iandunn/WordPress-Skeleton.git .
  • git remote rm origin
  • git mv environment-config-sample.php environment-config.php
    • then update its values
  • git rm --cached environment-config.php
  • Rename WordPress Functionality Plugin submodule, update .gitignore, then follow the installation instructions for it
    • git checkout master before renaming/editing wordpress-functionality-plugin-skeleton.php
  • To work with wp-cli, just add alias wp='wp --path=wordpress' to your ~/.bashrc or /etc/profile.d/custom.sh file
  • For nginx, just set the default server root to the /wordpress directory, and then add an extra location rule to use the / directory as the root for /content/ URLs.
server {
    listen       80;
    listen       443 ssl;
    server_name  example.org;
	root         /srv/www/example.org/wordpress;

    location /content/ {
		root /srv/www/example.org/;
		try_files $uri $uri/ /wordpress/index.php?$args;
    }
}

TODO

  • Refactor .htaccess to mimick approach from nginx rules if possible
  • Look into possible redirect bugs
  • Add redirect to production for static content files, so don't have to pull them down to dev/staging RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule wp-content/uploads/(.*) http://example.org/wp-content/uploads/$1 [NC,L]
  • If #25219-core not accepted, maybe put in something to display notices. could probably be separate plugin released in repo.
  • Consider leaving WP_DEBUG on in production, but logged instead of displayed?
  • Review updates to upstream and other forks too see what should be merged
  • Since .htaccess is versioned, add an example of setting up rules based on whether the site is dev/staging/production. e.g, htauth
    • Use dev as the fallback/default in the condition, not production
  • Add default plugins
    • Akismet
    • WP Super Cache or W3 Total Cache
    • Login Security Solution
    • WordFence
    • Google Authenticator
    • WP-DB-Backup (or something newer)
    • Google XML Sitemap, or similar?
    • Subscribe To Comments, or similar?
    • Formidable?
    • Use Brian Petty's github mirror of the dotorg repo
  • Also setup some kind of configuration management in the mu-plugin to make your own default settings
  • Maybe add reset-file-permissions.sh, and update instructions to move it above httpdocs and update paths

wordpress-skeleton's People

Contributors

iandunn avatar markjaquith avatar

Watchers

James Cloos avatar Dustin Tran 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.