Setting up a WordPress VVV2 Vagrant Workflow
Using VVV2 Vagrant as a WordPress local development workflow is a great flexible platform, here’s mine which uses 3 bits of software, (plus 2 as options) to create a vagrant box. VirtualBox, Vagrant, VVV, VVV Dashboard (optional) and VVV Base (optional, but very worth it IMO). Each of these bits build on the other and…
Read MoreWhat is a reference assignment in PHP?
A reference assignment in PHP in respect of variables is when a variable references another variable. So for example 2 variables… $a = ‘red’; $b = ‘blue’; echo $a . ‘<br>’; echo $b . ‘<br>’; The first echo output will produce ‘red’ and ‘blue’ Now change $b to reference $a $b =& $a; echo $a…
Read MoreDeploying a WordPress site via Git Hooks on a ServerPilot Server
This guide looks at setting up a git deployment using hooks to push local commits from a local development to a remote development branch which then published those changes live, stored on a staging domain using a ServerPilot set up. First up is to set up a ServerPilot app, add your system user and create…
Read MoreOptimise wp_postmeta table and remove custom fields meta keys
Overtime a wp_postmeta WordPress database table may become bloated and use redundant custom field meta_keys. The table may have thousands of rows worth of dead data such as old custom fields. You can remove these keys quite quickly in the MySQL database once you know the key format, I recently took over a site that previously…
Read MoreWhat are Classes and Methods in OOP PHP
This tutorial is a beginners look at OOP(object oriented programming) in PHP and covers what a class, method and variables are as well as how to instantiate a class and add variables to it. a class in OOP Php A class in php is an object in object oriented programming or OOP, the class defines…
Read MoreRemove Unused Image Media Sizes In Your WordPress Theme
Keeping your WordPress image media library under control can mean a big difference to your site loading faster as well as your hard disk size footprint with the ability to easily back up or migrate your site. You basically need to remove any unused image sizes and images themselves not used, optimise existing image sizes and ensure future…
Read MoreAdd WordPress Admin Account to Database wp_users Table
Here is a guide on how you can add in a newWordPress admin account username and password to the database. What you do need to do this have access to the WordPress database by having the database name and password. Also instead of adding an extra admin account you can just change the admin password…
Read MoreHiding a WordPress Development Site from Googles Search Engine Index
Hiding a WordPress development website from the Google search engine index is something you need to do and can be done in a couple of ways. Why you need to do it is that once your pages are indexed they’ll take a while to get rid of and since you are in development stage you’ll…
Read MoreChange the Keyboard Shortcut Keys in Beaver Builder 2 Plugin
You can modify the Beaver Builder keyboard shortcut keys in the new version 2 of the plugin by using a filter – fl_builder_keyboard_shortcuts that you add to your themes functions.php file, example below add_filter( ‘fl_builder_keyboard_shortcuts’, ‘get_keyboard_shortcuts_mine’ ); /** * Modify the Beaver Builder 2 Keyboard shortcuts */ function get_keyboard_shortcuts_mine( $data ) { $data[‘showModules’][‘keyCode’] = ‘m’;…
Read MoreOverride the Beaver Builder Global Settings Including Media Query Breakpoints
Beaver Builder Global Settings can be overridden including the Media Query breakpoints via the Tools > Global Settings in the Beaver Builder interface. If you have a starter theme you can permanently override these settings by using the fl_builder_register_settings_form filter which will allow you to set the modified global settings permanently so you don’t…
Read More