Basic layout of a WordPress Git repository using Composer for dependency management.
Basic layout of a WordPress Git repository using Composer for dependency management.
This is undoubtedly true, but for convenience sake we keep our main project skeleton as a private repository. This is so we can include stuff like license keys and secret potions that your prying eyes can’t handle.
Alright, developer. Sitting there. So smug. So confident. Thinking about how smart you must look.
This is a composer driven project skeleton. So this is the general setup:
composer.json
with your local dev domain.composer install
local-config-sample.php
to local-config.php
and update with your DB credentials / information. Also replace example.app
in this file.wp-content/themes/objectiv-starter-theme
to the site name. However if you do this, you’ll have to remove it from composer since it will redownload it if you don’t.wp-config.php
to include the necessary details for your production environment. You can define these credentials directly (less ideal) or do some type of find/replace on deploy. (more ideal)This project includes the composer repositories to download WP Migrate DB Pro, Advanced Custom Fields Pro, and Gravity Forms. You’ll need to add your own values to make them work.
You’ll also need to add one or more of these to the required packages:
"deliciousbrains/wp-migrate-db-pro": "*",
"deliciousbrains/wp-migrate-db-pro-media-files": "*",
"deliciousbrains/wp-migrate-db-pro-cli": "*",
"deliciousbrains/wp-migrate-db-pro-multisite-tools": "*",
"gravityforms/gravityforms": "*",
"advanced-custom-fields/advanced-custom-fields-pro": "*",
Composer versions are set to *
for every package. So you’ll always get the latest version of everything.