-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/libs-blocks-merge' into develop
- Loading branch information
Showing
10 changed files
with
347 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# Wordpress files | ||
wp-admin | ||
wp-includes | ||
/license.txt | ||
/readme.html | ||
/wp-activate.php | ||
/index.php | ||
/wp-blog-header.php | ||
/wp-comments-post.php | ||
/wp-config-sample.php | ||
/wp-config.php | ||
/wp-cron.php | ||
/wp-links-opml.php | ||
/wp-load.php | ||
/wp-login.php | ||
/wp-mail.php | ||
/wp-settings.php | ||
/wp-signup.php | ||
/wp-trackback.php | ||
/xmlrpc.php | ||
|
||
# Content | ||
!wp-content/plugins/ | ||
|
||
# Theme | ||
wp-content/* | ||
!wp-content/mu-plugins/ | ||
!wp-content/plugins/ | ||
!wp-content/themes/ | ||
/wp-content/themes/index.php | ||
|
||
# Ignore these plugins from the core | ||
wp-content/plugins/hello.php | ||
wp-content/plugins/akismet/ | ||
/wp-content/plugins/index.php | ||
|
||
# Ignore specific themes | ||
wp-content/themes/twenty*/ | ||
|
||
# Mac OS custom attribute store and thumbnails | ||
*.DS_Store | ||
._* | ||
|
||
# Error logs | ||
error_log.txt | ||
wordfence-waf.php | ||
wflogs | ||
|
||
# Databases and exports | ||
latest_dump.tar.gz | ||
latest_dump |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Project info | ||
|
||
## Database | ||
Before you start developing ask a lead developer to export you the latest version of the database. | ||
|
||
## Development environment | ||
* `feature` branch | ||
* Development is done localy on your computer | ||
* Create `feature/feature-name` branch from `master` and create pull request to `staging` branch | ||
``` | ||
http://dev.boilerplate.com/ | ||
``` | ||
|
||
## Staging server | ||
* `staging` branch | ||
* QA testing and client tests and approvals | ||
* Never merge `staging` to `master` branch. | ||
``` | ||
https://staging.boilerplate.com/ | ||
``` | ||
|
||
## Production server | ||
* `master` branch | ||
* Create pull request from `feature` branch to `master` when it is production ready | ||
* **NO OVERRIDING THE DATABASE** | ||
``` | ||
https://boilerplate.com/ | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/usr/bin/env sh | ||
|
||
function build() { | ||
cd wp-content/themes/eightshift-boilerplate; | ||
npm install | ||
composer install --no-dev --no-scripts | ||
npm run build | ||
} | ||
|
||
build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/usr/bin/env sh | ||
|
||
# Prettyfiers | ||
BLUE='\033[0;36m' | ||
RED='\033[0;31m' | ||
BBLUE="\033[1;36m" | ||
NC='\033[0m' # No Color | ||
|
||
# Create temp folder | ||
if [ ! -d "db_dump" ]; then | ||
echo -e "${BLUE}Creating temp db_dump folder!${NC}" | ||
mkdir db_dump | ||
fi | ||
|
||
# Export latest db | ||
wp db export db_dump/latest.sql | ||
echo -e "${BLUE}Exporting db to db_dump/latest.sql${NC}" | ||
|
||
# Remove old dump | ||
if [ -f "latest_dump.tar.gz" ]; then | ||
echo -e "${BLUE}Removing old compressed latest.tar.gz file!${NC}" | ||
rm latest_dump.tar.gz | ||
fi | ||
|
||
# Exit if folders are not existing | ||
if [ ! -d "db_dump" ] || [ ! -d "wp-content/uploads/" ]; then | ||
echo -e "${RED}Fail! Folders are missing!${NC}" | ||
exit 1 | ||
fi | ||
|
||
# Compress folders | ||
tar czf latest_dump.tar.gz db_dump/ wp-content/uploads/ | ||
echo -e "${BLUE}Compressing folders success!${NC}" | ||
|
||
# Remove temp folder | ||
if [ -d "db_dump" ]; then | ||
rm -rf db_dump | ||
echo -e "${BLUE}Removing temp db_dump folder!${NC}" | ||
fi | ||
|
||
echo -e "${BBLUE}Export complete! File is located in root folder latest_dump.tar.gz${NC}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#!/usr/bin/env sh | ||
|
||
# Prettyfiers | ||
BLUE='\033[0;36m' | ||
RED='\033[0;31m' | ||
BBLUE="\033[1;36m" | ||
NC='\033[0m' # No Color | ||
|
||
# Check if dump exists | ||
if [ ! -f "latest_dump.tar.gz" ]; then | ||
echo "${RED}Fail! File latest_dump.tar.gz doesn't exist!${NC}" | ||
exit 1 | ||
fi | ||
|
||
# Remove temp folder | ||
rm -rf latest_dump | ||
|
||
# Create temp folder | ||
if [ ! -d "latest_dump" ]; then | ||
echo "${BLUE}Creating temp latest_dump folder!${NC}" | ||
mkdir latest_dump | ||
fi | ||
|
||
tar zxf latest_dump.tar.gz -C latest_dump | ||
echo "${BLUE}Exporting folders success!${NC}" | ||
|
||
# Clear the database of all tables | ||
wp db export | ||
wp db reset | ||
|
||
# Import database | ||
echo "${BLUE}Database import and search replace in progress...${NC}" | ||
wp db import latest_dump/db_dump/latest.sql | ||
|
||
# Search and replace for URL | ||
wp search-replace boilerplate.com dev.boilerplate.com --url=boilerplate.com --all-tables --network | ||
|
||
# Search and replace for https to http | ||
wp search-replace https://dev.boilerplate.com http://dev.boilerplate.com --all-tables --network | ||
|
||
echo "${BLUE}Flushing cache, removing transients and resetting premalinks!${NC}" | ||
wp cache flush | ||
wp transient delete --all | ||
wp rewrite flush | ||
|
||
echo "${BBLUE}Finished! Success!${NC}" |
43 changes: 43 additions & 0 deletions
43
eightshift-projects/bin/db-import-production-to-staging.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#!/usr/bin/env sh | ||
|
||
# Prettyfiers | ||
BLUE='\033[0;36m' | ||
RED='\033[0;31m' | ||
BBLUE="\033[1;36m" | ||
NC='\033[0m' # No Color | ||
|
||
# Check if dump exists | ||
if [ ! -f "latest_dump.tar.gz" ]; then | ||
echo "${RED}Fail! File latest_dump.tar.gz doesn't exist!${NC}" | ||
exit 1 | ||
fi | ||
|
||
# Remove temp folder | ||
rm -rf latest_dump | ||
|
||
# Create temp folder | ||
if [ ! -d "latest_dump" ]; then | ||
echo "${BLUE}Creating temp latest_dump folder!${NC}" | ||
mkdir latest_dump | ||
fi | ||
|
||
tar zxf latest_dump.tar.gz -C latest_dump | ||
echo "${BLUE}Exporting folders success!${NC}" | ||
|
||
# Clear the database of all tables | ||
wp db export | ||
wp db reset | ||
|
||
# Import database | ||
echo "${BLUE}Database import and search replace in progress...${NC}" | ||
wp db import latest_dump/db_dump/latest.sql | ||
|
||
# Search and replace for URL | ||
wp search-replace boilerplate.com staging.boilerplate.com --url=boilerplate.com --all-tables --network | ||
|
||
echo "${BLUE}Flushing cache, removing transients and resetting premalinks!${NC}" | ||
wp cache flush | ||
wp transient delete --all | ||
wp rewrite flush | ||
|
||
echo "${BBLUE}Finished! Success!${NC}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#!/usr/bin/env sh | ||
|
||
# Prettyfiers | ||
BLUE='\033[0;36m' | ||
RED='\033[0;31m' | ||
BBLUE="\033[1;36m" | ||
NC='\033[0m' # No Color | ||
|
||
# Check if dump exists | ||
if [ ! -f "latest_dump.tar.gz" ]; then | ||
echo "${RED}Fail! File latest_dump.tar.gz doesn't exist!${NC}" | ||
exit 1 | ||
fi | ||
|
||
# Remove temp folder | ||
rm -rf latest_dump | ||
|
||
# Create temp folder | ||
if [ ! -d "latest_dump" ]; then | ||
echo "${BLUE}Creating temp latest_dump folder!${NC}" | ||
mkdir latest_dump | ||
fi | ||
|
||
tar zxf latest_dump.tar.gz -C latest_dump | ||
echo "${BLUE}Exporting folders success!${NC}" | ||
|
||
# Clear the database of all tables | ||
wp db export | ||
wp db reset | ||
|
||
# Import database | ||
echo "${BLUE}Database import and search replace in progress...${NC}" | ||
wp db import latest_dump/db_dump/latest.sql | ||
|
||
# Search and replace for URL | ||
wp search-replace staging.boilerplate.com dev.boilerplate.com --url=staging.boilerplate.com --all-tables --network | ||
|
||
# Search and replace for https to http | ||
wp search-replace https://dev.boilerplate.com http://dev.boilerplate.com --all-tables --network | ||
|
||
echo "${BLUE}Flushing cache, removing transients and resetting premalinks!${NC}" | ||
wp cache flush | ||
wp transient delete --all | ||
wp rewrite flush | ||
|
||
echo "${BBLUE}Finished! Success!${NC}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/usr/bin/env sh | ||
|
||
function deploy() { | ||
cd wp-content/themes/eightshift-boilerplate; | ||
npm install | ||
composer install --no-dev --no-scripts | ||
npm run build | ||
} | ||
|
||
deploy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/wp-content/themes/eightshift-boilerplate/node_modules | ||
.git |
Oops, something went wrong.