We just started playing with WordPress’s VIP scanning plugin but ran into an issue when trying to scan with the WordPress coding standards. PHP Notice: Undefined index: slug in /var/www/wp-content/plugins/vip-scanner-master/vip-scanner/checks/WordPressCodingStandardsCheck.php on line 173 After a little bit of digging we found that there’s a problem with the way that the…
Category: WordPress
Varnish as a frontend for a remote WordPress install – Part 2
Part of this setup Nginx, MySql, PHP and WordPress. This part is for configuring Varnish 4.0 on Ubuntu 14.04 On varnish.chris.example.com Install Varnish 4.0 Add Varnish’s GPG key curl https://repo.varnish-cache.org/ubuntu/GPG-key.txt | sudo apt-key add – Add the source location echo “deb https://repo.varnish-cache.org/ubuntu/ trusty varnish-4.0” | sudo tee /etc/apt/sources.list.d/varnish-cache.list Update local cache…
Varnish as a frontend for a remote WordPress install – Part 1
This tutorial assumes two sites, varnish.chris.example.com and web.chris.example.com. Both of my test sites will be created on DigitalOcean but on separate instances. Both will be running basic Ubuntu 14.04. On web.chris.example.com Install Nginx Add the dev repo so that we can get to 1.7.x: sudo apt-add-repository ppa:nginx/development sudo apt-get update Verify…
How to unit test with PHPUnit + Ubuntu 14.04 + WordPress – Part 1
The below is pretty much directly from the online manuals for PHPUnit and WordPress but copied here for my personal usage. Install PHPUnit Download: wget https://phar.phpunit.de/phpunit.phar Make executable: chmod +x phpunit.phar Move globally: sudo mv phpunit.phar /usr/local/bin/phpunit Test phpunit –version Optionally, if you want to verify the signature, between steps…
WordPress + Nginx + HHVM
Today I played around with installing WordPress 3.9 on Nginx at DigitalOcean and was amazed at how easy it really was. It was so easy that I decided to also install HHVM. I’m not going to go into every detail since I mostly just used already existing tutorials that I combined….
WordPress command line (WP-CLI) and proc_open
WP-CLI is an awesome command line tool to manage your WordPress installation. You can view plugin information, perform plugin or core updates and show the current cron tasks. This is great for both system administrators who don’t always have user accounts within WordPress as well as WP admins who don’t want to fire up a…
Disable WordPress’s cron for XML-RPC requests
WordPress has a custom task scheduler that gets fired on every single request to a WordPress site. By “fired” I mean that every request involving WordPress causes a lookup to see if there are any tasks waiting to be run and if so runs them. The tasks are actually run by the…
Additional string formatting for $wpdb->insert
I really like using the helper $wpdb class for inserts but occasionally I have a need to insert data using more than just %s, %d or %f format strings. Almost everyone will tell you to manually write your own INSERT statement and then just pass that to $wpdb->prepare() (which $wpdb->insert()…