{"id":22009879,"url":"https://github.com/herm71/bbwordpress","last_synced_at":"2026-05-21T05:03:56.191Z","repository":{"id":20783755,"uuid":"24068770","full_name":"Herm71/bbwordpress","owner":"Herm71","description":"bbwordpress","archived":false,"fork":false,"pushed_at":"2016-07-21T20:20:45.000Z","size":11673,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-23T07:32:07.271Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Herm71.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-09-15T18:43:20.000Z","updated_at":"2016-01-13T18:33:30.000Z","dependencies_parsed_at":"2022-09-11T10:40:40.212Z","dependency_job_id":null,"html_url":"https://github.com/Herm71/bbwordpress","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Herm71/bbwordpress","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Herm71%2Fbbwordpress","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Herm71%2Fbbwordpress/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Herm71%2Fbbwordpress/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Herm71%2Fbbwordpress/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Herm71","download_url":"https://codeload.github.com/Herm71/bbwordpress/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Herm71%2Fbbwordpress/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265472294,"owners_count":23771844,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-30T02:11:19.901Z","updated_at":"2026-05-21T05:03:51.151Z","avatar_url":"https://github.com/Herm71.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Blackbird Consulting WordPress\nThis is [Blackbird Consulting's](www.blackbirdconsult.com) base WordPress installation for use on all new projects. This git repository contains [WordPress](https://github.com/WordPress/WordPress) within it as a \"fake\" submodule, as demonstrated in [this post](http://debuggable.com/posts/git-fake-submodules:4b563ee4-f3cc-4061-967e-0e48cbdd56cb). In order to get a fresh version of WordPress from its own repo, simply ```cd wordpress```and perform a ```git pull```. \n\nTwo plugins are also included, [WP-Sync-DB](https://github.com/wp-sync-db/wp-sync-db), a custom plugin that assists with database migration, and [Github-Updater](https://github.com/afragen/github-updater). WP-Sync-DB is not located in the main WordPress plugin repo, it is located on GitHub. Therefore, in order to update WP-Sync-DB, GitHub-Updater must also be installed.\n\n## ```wp-content``` *outside* ```wordpress``` directory\n\nThis WordPress install is set up in a way that places the ```wp-content``` directory *outside* the main ```wordpress``` directory. This setup also places the ```index.php``` and ```wp-config.php``` files outside the ```wordpress``` directory. Thes files have been edited appropriately. This setup is oriented to be developed locally but pushed periodically to a staging environment. Thus, the ```wp-config.php``` has also been customized to allow inputting two sets of database credentials, one for your local development environment and one for the staging environment. \n\n###Changes made to the ```index.php``` file\n\nThe basic WordPress install ```index.php``` contains a reference that looks like this:\n\n    /** Loads the WordPress Environment and Template */\n    require( dirname( __FILE__ ) . '/wp-blog-header.php' );\n    \nThis block has been changed, because it now resides outside the primary wordpress directory, to point to that directory:\n\n    /** Loads the WordPress Environment and Template */\n    require( dirname( __FILE__ ) . '/wordpress/wp-blog-header.php' );\n    \n###Changes made to the ```wp-config.php``` file\n\nThe basic WordPress install ```wp-config.php``` has been altered, too. Because we have moved both ```index.php``` and the ```wp-content``` folder outside the ```wordpress``` core installation, we must reference this change in ```wp-config.php```, which lets WordPress know where the core files are stored and that ```wp-content``` is located in the root directory. The following block has been added just below the opening comment block, just above the database credentials block:\n\n####Tell WordPress where to go\n\n    /** Let's WordPress know that core files are in \"wordpress\" directory, site served from root of project directory */\n    define('WP_SITEURL', 'http://' . $_SERVER['SERVER_NAME'] . '/wordpress');\n    define('WP_HOME',    'http://' . $_SERVER['SERVER_NAME']);\n\n    /** Let's WordPress know that wp-content are in document root */\n    define('WP_CONTENT_DIR', $_SERVER['DOCUMENT_ROOT'] . '/wp-content');\n    define('WP_CONTENT_URL', 'http://' . $_SERVER['SERVER_NAME'] . '/wp-content');\n    \n####Tale of one database - the original ```wp-config.php``` file\n\nThe standard ```wp-config.php``` file contains the following block, which holds the database credentials:\n\n    // ** MySQL settings - You can get this info from your web host ** //\n\n    /** The name of the database for WordPress */\n    define( 'DB_NAME', 'database_name' );\n\n    /** MySQL database username */\n    define( 'DB_USER', 'db_user' );\n\n    /** MySQL database password */\n    define( 'DB_PASSWORD', 'password' );\n\n    /** MySQL hostname */\n    define( 'DB_HOST', 'localhost' );\n    \n\n####Tale of two databases\n\nThe ```wp-config.php``` file in this repository has been changed enable two databases, one in the local development environment and one in the online staging environment. this file should be changed to the original once the staging environment is pushed as a live site.\n\n    // ** MySQL settings - You can get this info from your web host ** //\n    if ($_SERVER['REMOTE_ADDR']=='127.0.0.1') {\n        define('WP_ENV', 'development');\n    } else {\n        define('WP_ENV', 'production');\n    }\n\n    // MySQL settings - You can get this info from your web host //\n    if (WP_ENV == 'development') {\n        define('DB_NAME', 'development_db_name');\n        define('DB_USER', 'root');\n        define('DB_PASSWORD', 'development_db_password');\n        define('DB_HOST', 'localhost');\n    } else {\n        define('DB_NAME', 'staging_db_name');\n        define('DB_USER', 'root');\n        define('DB_PASSWORD', 'staging_db_password');\n        define('DB_HOST', 'localhost');\n    } \n\n##Cloning and Mirroring\n\n###To clone this repository and include the submodules\n**Issue the following ```git``` command:**\n\n    blackbird@computer:~/htdocs$ git clone --recursive git@github.com:Herm71/bbwordpress.git yournewprojectdirectory\n\n###To use this repository in a new project\n**First, clone this repository into a temporary new bare repository on your local machine, like this:**\n\n    blackbird@computer:~/htdocs$ git clone --bare --recursive git@github.com:Herm71/bbwordpress.git tempbbwordpress.git\n    # Make a bare clone of the repository\n\n**next, mirror this temporary clone to a new repository on your server**\n\n    blackbird@computer:~/htdocs$ cd tempbbwordpress.git\n    #Enter temporary local repository directory\n        \n    blackbird@computer:~/htdocs/tempbbwordpress.git$ git push --mirror https://github.com/exampleuser/new-repository.git\n    # Mirror-push the temporary clone to a new repository\n\n**next, remove the temporary clone repository**\n\n    blackbird@computer:~/htdocs/tempbbwordpress.git$ cd ..\n    #move up one level\n\n    blackbird@computer:~/htdocs$ rm -rf tempbbwordpress.git\n    #remove temporary repository\n\n**Finally, create a new project directory on your development machine and clone the new repository into it:**\n\n    blackbird@computer:~/htdocs$ mkdir newprojectdirectory\n    # Create a new directory for your project\n\n    blackbird@computer:~/htdocs$ cd newprojectdirectory\n    # Enter the newly created directory\n\n    blackbird@computer:~/htdocs/newprojectdirectory$ git clone --recursive https://github.com/exampleuser/new-repository.git\n    # Remember to use recursive to include all submodules\n\n#Changelog\nApple has a formalised version number structure based around the NumVersion struct, which specifies a one- or two-digit major version, a one-digit minor version, a one-digit \"bug\" (i.e. revision) version.\n\n##0.2.1\n- minor edit to wp-config. Created Private Branch for Blackbird user/pass, deleted from Master\n\n##0.2.0\n- wp-sync-db removed. Add via GitHub-Updater from now on\n\n##0.1.0\n- removed submodules, replaced with \"fake\" submodule for wordpress\n- wp-sync-db added outside submodule framework. Will now be updated via GitHub-Updater\n- github-updater added\n\n##0.0.1\n- constructed repo with wp-content outside of primary wordpress directory\n- wordpress and wp-sync-db added as submodules","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fherm71%2Fbbwordpress","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fherm71%2Fbbwordpress","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fherm71%2Fbbwordpress/lists"}