Install and configure Fail2ban for CloudPanel on Ubuntu 22.04
CloudPanel out of the box comes with an application to deal with brute force attacks on SSH, NGINX and WordPress, only SSH has a configuration, the app is called Fail2ban. Fail2ban is an app which bans access to your site from IP addresses which are trying to login to your services such as SSH on port…
Read MoreKeep Github Original Repository and Forked Repo in Sync via the command line
This tutorial looks at keeping a GitHub fork in sync and updated with the original repository, it involves forking a repo from someone else’s account to your GitHub account, making a local copy of your fork via the command line, and then fetching any changes of the original repo and then pushing those changes back…
Read MoreSet up WordPress Code Standards phpcs on VS Code on macOS
Here is a guide on how to get WordPress code standards using PHPCodesniffer on Visual Studio Code text editor using the WordPress code standards, this will be done via adding PHPCodesniffer via Composer, you can also add PHPCodesniffer via Pear or Homebrew, I used to have it running via Pear but have found it to be not as reliable…
Read MoreSet Up SMTP/Email for Local Valet WordPress Development
If you have a Laravel WordPress Valet workflow, you can use MailHog as an email SMTP catchall solution when testing email issues. You set up an SMTP host on the WordPress install and all email sent gets captured in MailHog, a minimal and straightforward solution. Install MailHog Install MailHog and start via Homebrew brew install mailhog…
Read MoreGit Command Line References
A reference and collection of Git commands used on the command line… View the code on Gist.
Read MoreAdd phpMyAdmin to ServerPilot
By default when you set up a ServerPilot instance no GUI app is installed for MySQL interaction, ServerPilot recommend using Adminer which has a similar interface to phpMyAdmin and sits as a standalone single php file which you can use for individual database users. This guide however goes through using phpMyAdmin instead and using it…
Read MoreAdd Lets Encrypt SSL Certs on ServerPilot Free Plan
ServerPilots‘ free plan does not offer SSL certs from Lets Encrypt, it is only available on the paid plans, here is a guide below that can allow you to install and renew the SSL certs with a custom script. You need to be comfortable in the command line and be aware that ServerPilot will not…
Read MoreSetting 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 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 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 More