This project uses tacowordpress.
- Sass
- Composer
- Download a fresh copy of this repository
- Rename
app-template.php
toapp.php
- In
app.php
, set database connection info, table prefix, and salts
Note: app.php
is in .gitignore
, and should not be added to source control.
cd
into thehtml
directory- Run
composer install
Note: The vendor
directory is in .gitignore
, and should not be added to source control.
- Download a fresh copy of WordPress
- Append the WordPress version number to the
wordpress
directory name, aswordpress-x.x.x
- In the
wordpress-x.x.x
directory, deletewp-content
andwp-config-sample.php
- Move the
wordpress-x.x.x
directory intohtml
- Move
html/wp-config.php
into thewordpress-x.x.x
directory, or copy it from a previous version - In
html/.htaccess
, update the version number inRewriteRule ^ - [E=HTTP_WP_VERSION_FOLDER_NAME:wordpress-x.x.x]
to reflect the version of WordPress this setup is using
The entire contents of wp-config.php
should always be:
<?php
define('WP_CONTENT_DIR', ABSPATH . '/../app/wp-content');
require_once __DIR__.'/../app/app-wp-config.php';
- Set up your localhost to point to
html
- Create an empty database
- Install WordPress by visiting this URL:
[yoursite.com]/wp-admin/install.php
- Go through the WordPress installation process
- Log into the WordPress admin
- Activate the "App" theme
Note: when running the WordPress installation, do not use the standard install path. If you see the WordPress version number in the path, something went wrong. Use the URL specified above.
- Deploy files under version control
- Set up Composer on production server to deploy
vendor
directory, or use FTP (not recommended) - FTP
uploads
- FTP
app.php
Follow the instructions under Setting up the WordPress directory structure locally, leaving the previous version of WordPress intact.
- assets
- composer.json
- sql
- vendor - added after composer install (not to be committed)
- README.md
- LICENSE
- app-template.php > should become app.php
- html
- wordpress-x.x.x (folder)
- wp-config.php (Make sure to move this into [wordpress-x.x.x])
- app
- app-wp-config.php
- wp-content
- uploads (ignored in git)
- app-icons
- plugins
- taco-app
- _
- lib
- posts
- example: Post.php
- ThemeOptionBase.php (should be here by default)
- ThemeOption.php (should be here by default)
- taco-app.php
- terms
- traits
- themes
- app
- _
- css
- js
- app.js (requirejs loads files from the modules folder asynchronously)
- modules
- example: module-accordion.js
- example: module-slider.js
- lib
- requirejs
- requirejs.js
- requirejs
- scss
- _
- all other theme files
- app
These instructions are for Media Temple. This assumes you've chosen not to include Composer's vendor directory in your Git repo, and will be installing dependencies manually on the production site, hosted through Media Temple.
- SSH into the server
- Change your directory to home:
cd ~
- Install Composer:
curl -s https://getcomposer.org/installer | php -d allow_url_fopen=1 -d suhosin.executor.include.whitelist=phar
- Check if
.profile
exists:ls -al
- If
.profile
does not exist, create it:touch .profile
- Get the path of where PHP is installed:
which php
(should output something like/usr/bin/php
)
- Create a new wp-config.php in html/[new-wordpress-x.x.x]
- Get the path of where Composer is installed:
pwd
(should containcomposer.phar
in the path, such as/home/206841/users/.home/composer.phar
) - Open a text editor such as vim or nano to edit the file:
vim .profile
ornano .profile
- Create an alias, using the appropriate PHP and Composer paths:
alias composer="[PHP path] -d memory_limit=512M -d allow_url_fopen=1 -d suhosin.executor.include.whitelist=phar [Composer path]"
- Save the file
- Reload the file into memory:
source .profile
- Test that your alias to
composer.phar
works:composer
- The theme is setup to have more documentation, seen when logged into WordPress, under
/docs
- The theme is setup with a sample page for general wysiwyg and content entry, seen when logged into WordPress, under
/sample-page