This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// function to access node <package> which is above <hotel> | |
// https://www.wpallimport.com/documentation/code-snippets/#access-data-above-element-chosen-on-step-2 | |
function wpai_pmxi_before_xml_import( $importID ) { | |
// output all activity to a debug log, so we can see where script is failing | |
defined('PDD_DEBUG') or define('PDD_DEBUG', 1); // set to 1 for ON | |
defined('PDD_LOG_FILE') or define('PDD_LOG_FILE', WP_CONTENT_DIR . '/errors-pdd.log'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Block Bad Bots in CSF and MOD SEC - easy | |
# 1) install CSF and Mod Sec | |
# 2) Set up the mod sec rules - instructions here (note these are for Direct admin, they will likely work on other systems too) | |
# https://www.vpsbasics.com/security/how-to-block-bad-bots-using-modsecurity-with-directadmin/ | |
# 3) get bad bots list from Ultimate Bad Bot | |
# 3.1) Go Here: https://github.com/mitchellkrogza/apache-ultimate-bad-bot-blocker/tree/master/_generator_lists | |
# 3.2) Open the latest bad-user-agents-htaccess.list and view the "raw" | |
# 3.3) copy to your bad-botlist.txt file | |
# 4) install - then restart csf and ldf and watch your logs... | |
# hint: if you set LF_MODSEC in the csf firewall ( e.g. set it as LF_MODSEC = 5 and LF_MODSEC_PERM = 86400 (which is 24hrs) then CSF will add persistent offenders to the block list.... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Setting up mod_ratelimit on cPanel Server | |
# Provides additional stability on the server by rate limiting bandwidth, thereby slowing down connections and helping to stabilise server | |
# Useful help: https://usavps.com/blog/13241/ | |
# Useful help: https://httpd.apache.org/docs/2.4/mod/mod_ratelimit.html | |
# Useful help: https://maj0rmil4d.medium.com/how-to-limit-bandwidth-per-connection-on-apache-ratelimit-d59e8057ca7b | |
# 1) Check you have installed modules via easyapache; mod_ratelimit and mod_env | |
# 2) go to WHM > Apach config > include editor > pre-virtual hosts |