Sample Wordpress content for development
Detect slow plugins
This developer is a expirienced one, so the plugin should be quite useful.
Importing XML feeds
WP All Import is really the best tool to import XML feed into a site.
Dump MySQL from PHP
After trying a lot of stuff, the simplest is to download Adminer:
wget http://www.adminer.org/latest-mysql-en.php -O adminer.php
And download the database dump.
Wordpress in Git
Bare repository doesn’t contain the special
Instead, it contains all the contents of the .git sub-directory directly
in the main directory itself. The repository has to be “bare” (no
working files) in order to accept a push.
Enable shell access in Plesk
To have a Git setup, we need shell access. But it must be less restrictive than
/bin/bash (chrooted), so we must choose
I think this is exact setup I should have: A WordPress & Git workflow / Plausible Thought
Deploy websites using Git - the easy way | Deadly Technology Using Git with a central repository How to Run Your Own Git Server | Linux.com How To Set Up a Private Git Server on a VPS | DigitalOcean From FTP to Git: A Deployment Story - Tuts+ Code Article How to deploy WordPress themes with Git | Culttt Managing and deploying Wordpress with Git Answering The Most Important Questions About Using Git With WordPress | Elegant Themes Blog
I’m only putting my active themes and custom plugins in there.
Custom Post Types are another huge thing to put in there. Of course if you’re working with a child theme they most likely reside in your functions.php file so you may already be running those files through your Git.
Woow! I do need and use this plugin: WP Local Toolbox
- Tested the Debug Bar plugin, but it doesn’t seem any special or usefull to me.
Manage a site with Git
Version control for MySQL
Incorporating a MySQL in Git workflow.
Version control for mysql via git hooks - Tutorials - ProcessWire Support Forums http://stackoverflow.com/questions/5525360/mysqldump-git-hook-what-does-it-allow http://ben.kulbertis.org/2011/10/synchronizing-a-mysql-database-with-git-and-git-hooks/ https://gist.github.com/nuclearsandwich/904891
pre-commit hook located in
cat <<'EOF' >> .git/hooks/pre-commit #!/bin/sh # the root of repository WP_ROOT=$(git rev-parse --show-toplevel) # db details from wp-config WP_DBNAME=`cat $WP_ROOT/wp-config.php | grep DB_NAME | cut -d \' -f 4` WP_DBUSER=`cat $WP_ROOT/wp-config.php | grep DB_USER | cut -d \' -f 4` WP_DBPASS=`cat $WP_ROOT/wp-config.php | grep DB_PASSWORD | cut -d \' -f 4` WP_DBHOST=`cat $WP_ROOT/wp-config.php | grep DB_HOST | cut -d \' -f 4` # must force network access as we are in a jail mysqldump --protocol=TCP -h $WP_DBHOST -u $WP_DBNAME -p$WP_DBPASS --skip-extended-insert $WP_DBNAME > $WP_ROOT/.dump.sql cd $WP_ROOT/ git add .dump.sql EOF # mark it as executable chmod +x .git/hooks/pre-commit
Restore later with
cd /web cat <<'EOF' >> .dump.restore.sh #!/bin/sh # the root of repository WP_ROOT=$(git rev-parse --show-toplevel) # db details from wp-config WP_DBNAME=`cat $WP_ROOT/wp-config.php | grep DB_NAME | cut -d \' -f 4` WP_DBUSER=`cat $WP_ROOT/wp-config.php | grep DB_USER | cut -d \' -f 4` WP_DBPASS=`cat $WP_ROOT/wp-config.php | grep DB_PASSWORD | cut -d \' -f 4` WP_DBHOST=`cat $WP_ROOT/wp-config.php | grep DB_HOST | cut -d \' -f 4` # must force network access as we are in a jail mysql --protocol=TCP -h $WP_DBHOST -u $WP_DBNAME -p$WP_DBPASS $WP_DBNAME < $WP_ROOT/.dump.sql EOF # mark it as executable chmod +x .dump.restore.sh
Multiple hosts on multiple browsers
DNS prefetching is disabled
Regardless of whether DNS prefetching is disabled or not, the DNS queries are NOT going through the proxy. DNS prefetching may add it’s own quirks to getting this working, but right now DNS queries are not forwarded through the proxy when prefetching is on and they are not forwarded through the proxy when prefetching is off.
DNS Leaks during an SSL / SOCKS tunnel
If you are using Chrome, lucky you - you don’t have this problem. Chrome by default sends all DNS requests through the SSH tunnel. But if you are using Firefox you’ll need to change one more setting. First let’s demonstrate the issue using the website https://dnsleaktest.com/
Yes. DNS query via SOCKS5 proxy is available since Chrome 18.104.22.168 in Feb 2010
From the online research I’ve done, when Chrome is set to use a SOCKS proxy
Development environment: http://stackoverflow.com/a/5024403/586898