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 MoreIncrease the Upload Size for MySQL Database in cPanel with phpMyAdmin
cPanel/WHM Server imposes a limit on the size of importing a WordPress MySQL database that can be imported into phpMyAdmin. The default size is 50MB which is set in the cPanel/WHM settings. You can change the settings either in cPanel or separately in WHM depending on what you have available. Failing that there are other ways…
Read MoreRedirecting a Web Folder Directory to another Directory in htaccess
Redirecting within the same domain Using htaccess in your root level of your web server, how you redirect one page to another is: RewriteRule ^url-string-to-redirect$ http://www.yourdomain.com/your-new-url-string [R=301,L]
Read MoreBlock Modsec WAF from WordPress Website
You can block modsec WAF from your website via .htaccess with the following code… <IfModule mod_security.c> SecFilterEngine Off SecFilterScanPOST Off </IfModule> This may help when in development, remove when finished to get the protection back. If there is an actual rule you keep triggering you can make an exemption by IP address… # Whitelist 401…
Read MoreAdding Expires Header to htaccess
Expires Headers are a set of rules or directives from a website to tell a user’s local browser to either look in its own cache for files or to request the files off the webserver, the former is better for speed of the web page load and a reduction in the webserver processing. For Apache…
Read MoreRedirect all pages to non-www and HTTPS in WordPress
To redirect all URLs from www to non-www and also to redirect from http to https, this code snippet to be added to .htaccess file at the top should do the trick. So https://example.com # BEGIN Redirects RewriteEngine On # 301 redirect www to non-www RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] RewriteRule ^(.*)$ https://%1/$1 [R=301,L] # 301…
Read MoreSecure the WP Admin Folder in WordPress Using htaccess
To protect your WordPress wp-admin folder from everyone else apart from you, you can add a htaccess file in the /wp-admin folder to allow only access from your IP address and everyone else will be denied and receive a ‘Page Not Found‘ 404 error. This ensures no-one can even get to the login screen which…
Read More