- Git clone project to a temp folder
- Install Wordpress to the project folder
- Copy .git/ from temp folder to project folder
- Remove temp folder
- Run: git checkout -- .
- Load the site in your browser and run the install to generate wp-config.php
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
# This is a template .gitignore file for git-managed WordPress projects. | |
# | |
# Fact: you don't want WordPress core files, or your server-specific | |
# configuration files etc., in your project's repository. You just don't. | |
# | |
# Solution: stick this file up your repository root (which it assumes is | |
# also the WordPress root directory) and add exceptions for any plugins, | |
# themes, and other directories that should be under version control. | |
# | |
# See the comments below for more info on how to add exceptions for your |
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
#!/bin/sh | |
# | |
# Author: Peter Toi | |
# Source: https://gist.github.com/petertoi/24b598eb269fac767cc7 | |
# | |
# Usage 1: $ sshkey2remote.sh # No argument will result in prompts | |
# Usage 2: $ sshkey2remote.sh user@host # Skip the prompts by including the argument | |
if [ "$#" -eq 1 ] | |
then |
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
#!/bin/bash | |
if [ $# -ne 1 ]; then | |
echo "Usage: sphp [phpversion]" | |
exit 1 | |
fi | |
currentversion="`php -r \"echo str_replace('.', '', substr(phpversion(), 0, 3));\"`" | |
newversion="$1" |
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
#!/bin/bash | |
# | |
# Author: Peter Toi | |
# Source: https://gist.github.com/petertoi/b61ac28f2cd27a2c645d | |
# | |
# Usage 1: $ wgetseq.sh # No argument will result in prompts | |
# Usage 2: $ wgetseq.sh starturl endurl startnum endnum # Skip the prompts by including the arguments | |
if [ "$#" -eq 4 ] | |
then |
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
#!/bin/sh | |
# | |
# Author: Peter Toi | |
# Source: https://gist.github.com/petertoi/79d77b041f1f8f93c456 | |
# | |
# Usage 1: $ check_plugin_version.sh # No argument will prompt for plugin file name | |
# Usage 2: $ check_plugin_version.sh pluginfile # Skip the prompts by including the file name as an argument | |
if [ "$#" -eq 1 ] | |
then |
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
#!/bin/sh | |
# | |
# Author: Peter Toi | |
# Source: https://gist.github.com/petertoi/23d072d1d8589d9f5386 | |
# | |
# Usage 1: $ injectionscan.sh | |
rm -fr injections.txt | |
touch injections.txt |
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
#!/bin/sh | |
NODEVERSION=v0.12.2 | |
SRCPATH=$HOME/src/node | |
LOCALPATH=$HOME/usr/local | |
BINPATH=$LOCALPATH/bin | |
mkdir -p $SRCPATH | |
mkdir -p $LOCALPATH |
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
#!/bin/sh | |
# | |
# Author: Peter Toi | |
# Source: https://gist.github.com/petertoi/8f7e42b867cbb85ec47b | |
# | |
# Usage 1: $ digall.sh # No argument will prompt for domain | |
# Usage 2: $ digall.sh domain # Skip the prompts by including the domain as an argument | |
if [ "$#" -eq 1 ] | |
then |
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
# Be sure to comment out the /files rules in /vagrant/config/nginx-config/nginx-wp-common.conf | |
# then add this to the bottom of the your /vagrant/config/nginx-config/sites/domain.conf | |
# replace 'domain' with the domain associated with your project | |
if ($http_host ~ (.*)\.domain\.dev) { | |
set $subdomain $1; | |
} | |
location ~ ^/files/(.*) { | |
rewrite ^/files/(.*)$ http://$subdomain.domain.com/files/$1 redirect; | |
} |
OlderNewer