Use 7G WAF Firewall with OpenLiteSpeed on a RunCloud instance
You can use the 7G WAF FIrewall from Jeff Starr at Perishable Press with a web app running on top of OpenLiteSpeed using htaccess at the server level. This can also be used on a RunCloud OLS server (they already have a GUI 7G install for NGINX as part of their web stack). You can…
Read MoreBlock xmlrpc.php WordPress running on OpenLiteSpeed using .htaccess
You can block the xmlrpc.php WordPress file when running on OpenLiteSpeed by adding a rewrite rule in the .htaccess file. This will reduce the brute force threat of bots making multiple resource requests. Add to your webroot .htaccess file either add it in a mod_rewrite existing block or add a new one: <IfModule mod_rewrite.c> RewriteRule…
Read MoreBlock wp-login.php and xmlrpc.php via fail2ban on RunCloud
How to ban IP addresses that are brute forcing your wp-login.php and xmlrpc.php on a WordPress install with fail2ban on a RunCloud server. Email yourself any fail2ban IP addresses. Add a WordPress fail2ban filter Create a wordpress.conf file in /etc/fail2ban/filter.d/ [Definition] failregex = ^<HOST> .* “POST .*wp-login.php ^<HOST> .* “POST .*xmlrpc.php ignoreregex = If using…
Read MoreOutput a Custom Taxonomy Archive by using Loop in WordPress
You can’t use a WordPress archive taxonomy page for a custom taxonomy as the custom terms are the archive – but you may want a sort of global taxonomy page that contains all the custom terms. Here is a custom taxonomy loop code snippet, which allows you to output a set of custom taxonomy terms…
Read MoreKeep WordPress database leaner by removing autoloaded options from wp_options table
In WordPress a number of autoloaded options are loaded on every page, this gathers over time with deleted themes, plugins etc and can slow down a site. Typically most options that are installed in the database are permanently stored. These options which are autoloaded are loaded on very WordPress page. To see the total size…
Read MoreChange WooCommerce Checkout Page To A 2-Column Layout
The default WooCommerce checkout page layout doesn’t make great use of a 2nd right hand column and looks a bit disjointed. Here is some CSS that can push the product order data to the 2nd column balancing the layout more evenly, making for a better user experience whilst checking out. The CSS kicks in at…
Read MoreSet up WordPress cron to run via server cron in cPanel, Cloudways and RunCloud
By default the WordPress tasks that have been set up to run with wp-cron.php only run when a WordPress page is visited by a user, if the site has low traffic then tasks make take a while to action, if the site is high traffic and has caching then this can also cause reliability issues,…
Read MoreAdd and install PHP to macOS Monterey 12 with Homebrew
The latest macOS version Monterey 12 has removed PHP altogether from its operating system, there is a comment in the Apache config file httpd.conf that says: #PHP was deprecated in macOS 11 and removed from macOS 12 Fortunately you can install PHP and all the different PHP versions including 5.7, 7.4 and 8 with some…
Read MoreEnable the root user in macOS Monterey and earlier macOS versions
Here is how you enable the root user in macOS Monterey and earlier macOS versions, the macOS root user is disabled by default when the OS is installed. As an admin user launch System Preferences from the Apple Menu and go to the User and Groups pane, you will need to authenticate first by clicking on the padlock icon down the bottom left, then…
Read MoreUsing wp-cli commands to create and import WordPress databases
You can use wp-cli to do a number of tasks around the WordPress database including creation and importing, below are a few commands and what they do. Remove all existing WordPress tables wp db reset This will remove all existing WordPress tables and leave the db empty, but you still have a db. Delete the…
Read More