Wordpress development

Wordpress development

WordPress Development Plugins

Sample Wordpress content for development

Easier Theme Development with Sample WordPress Content - WPCandy Theme Unit Test « WordPress Codex


Importing XML feeds

WP All Import is really the best tool to import XML feed into a site.

Script to convert XML data into wp-importer XML format. Then, you can use plugin WordPress Importer to import that data.

Four Plugins to Import Content into WordPress Blogs

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

Deploy websites using Git

Bare repository doesn’t contain the special .git sub-directory. 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 /bin/bash.


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.


Naked Wordpress | The solution for designers who don’t know Wordpress

  • Tested the Debug Bar plugin, but it doesn’t seem any special or useful to me.

stracker-phil/wp-no-white-screen


Manage a site with Git

How to manage your website with git

Using Git to manage a web site My pre-receive hook to update my website when I “git push origin master:live” A web-focused Git workflow | Joe Maller A git Primer Managing Websites 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 ./.git/hooks/

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 ./.dump.restore.sh:

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/

goodbye galaxy!: SSH / SOCKS tunnelling and avoiding DNS leaks.

network.proxy.socks_remote_dns

DNS leak test

Yes. DNS query via SOCKS5 proxy is available since Chrome 4.0.249.89 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


Best Collection of Code for your functions.php file



https://marcjenkins.co.uk/2014/06/a-wordpress-git-workflow/


Very nice: Browser testing of WordPress theme during development


SCSS & LESS support on WordPress

Desktop converter: Koala - a gui application for LESS, Sass, Compass and CoffeeScript compilation.

Wordpress

GitHub - ConnectThink/WP-SCSS: Wordpress Plugin that compiles sass using scssphp is most popular. WP Compiler Lenix scss compiler

date 11. Oct 2019 | modified 20. Jan 2023
filename: WordPress - Development