Provides a clean initial structure for setting up WordPress (trunk) in a subdirectory with a separate content directory. Once this repository is cloned, the origin can be removed and your repo can live on elsewhere as it changes.
WordPress is provided via submodule from github.com/WordPress/WordPress, which tracks the WordPress SVN repository and updates every 15 minutes.
Getting started is easy.
- Decide which directory this site will live in.
- Clone this repo to that directory - git clone git://github.com/jeremyfelt/wordpress-subdirectory-clean.git my-new-wordpress-site
- Initialize and update the WordPress submodule in the repository
- cd my-new-wordpress-site
- git submodule init
- git submodule update
- At this point, if you don't want WordPress trunk, you can checkout another branch from the submodule.
- cd wordpress
- git checkout 3.4-branch
- Configure your HTTP server to point to your my-new-wordpress-site directory
- Add a new database to MySQL and setup user permissions
- Configure and move required files to their proper names - mv configure-gitignore .gitignore - mv configure-local-config.php local-config.php - mv configure-wp-config.php wp-config.php
- Go to your new domain and install WordPress
Then put it under version control!
- Stop tracking this clone, there's no need to. - git remote rm origin
- Create a new repository, if you want, on another remote - git remote add my-new-git-remote-url
- Update your WordPress submodule regularly - git submodule update
- New plugins and themes are installed in my-new-wordpress-site/content/
- Use this to keep your local and production environments in tune.