Skip to content
This repository has been archived by the owner on May 7, 2021. It is now read-only.
/ wp-site-base Public archive

WordPress boilerplate site directory for use with wp-vvv2-make-site for local development.

Notifications You must be signed in to change notification settings

SeanM88/wp-site-base

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wp-site-base

Boilerplate WordPress site directory for use with Varying Vagrant Vagrants local environments, although could easily be used in any new WordPress project where you want to track an actual WordPress website and optionally use Git for deployment.

This Git repo begins at the same level as the actual WordPress site directory, meaning the same folder that wp-config.php, wp-content directory, etc. are usually located.

By default, it is set up to only track specific themes and plugins critical to site functionality & display by whitelisting their directories in the provided .gitignore file, although other folders & files can be whitelisted as desired, it is usually best practice to only track especially relevant files.

Note: the Git repo and actual directory name do not need to match; this is worth mentioning because this directory is usually named something like public_html or htdocs on most webservers and requires extra unnessary server configuration to change, so its best left as is.

You can however specify a meaningful name (e.g. mycoolwebsite) for the Git repository at other locations, for example at Git hosting sites like GitHub and Bitbucket.

Getting Started

While wp-project-base can be easily adpated as a base for any new WordPress site, it was originally created for local WordPress development using Varying Vagrant Vagrants.

Therefore, directions here pertain to using this repo in combination with VVV 2 + wp-vvv2-make-site projects.

Prerequisites

Install

  1. Clone this repo into a local directory on your computer, replacing "my-site-name" with your own site's. git clone https://github.com/SeanM88/wp-site-base.git my-site-name

  2. Run the following command (again replacing "my-site-name" with your own) to move to the newly created site directory and remove the existing .git subfolder — this tracks wp-site-base, we want to track our site in it's own repo. cd my-site-name && rm -Rf .git

Configuration

We now have a fresh and clean site directory to use with wp-vvv2-make-site and get started developing our site locally. Before we can actually use it though we need to add our site's theme and any necessary plugins.

  1. Copy your site's theme and required plugins into the respective /themes/ and /plugins/ directory inside /wp-content/

  2. Open the .gitignore file and whitelist all the theme and plugin directorys you just added, using the Git negate pattern prefix.
    Theme example: !wp-content/themes/my-site-theme/ Plugin example: !wp-content/plugins/my-plugin/

  3. Initialize a new Git repo and optional initial commit message: git init -m "Initial commit of my-site-name"

  4. Add all files to be tracked and commit: git add . &$ git commit -m "Track site files"

  5. Using a Git hosting service like GitHub or Bitbucket, create a new empty repo and import your site's newly created Git repo.

  6. That's it! Copy the repo's URL and you're ready to automatically import your's repo with the wp-vvv2-make-site site wizard.

Next Steps

See the official wp-vvv2-make-site docs for more help with setting up a working local copy of WordPress with your site.

About

WordPress boilerplate site directory for use with wp-vvv2-make-site for local development.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published