Skip to content

Instantly share code, notes, and snippets.

View sebastianmoran-mainwp's full-sized avatar
🚀
Safeguarding Your Business from Password Spraying Tactics

Sebastian Moran sebastianmoran-mainwp

🚀
Safeguarding Your Business from Password Spraying Tactics
View GitHub Profile
@sebastianmoran-mainwp
sebastianmoran-mainwp / Commands
Last active November 21, 2018 04:34
WP-CLI cron events commands
wp cron test
wp cron event list
wp cron event delete delete_version_transients
wp option delete cron
@sebastianmoran-mainwp
sebastianmoran-mainwp / import-file.csv
Last active January 29, 2019 04:35
Redirection plugin - readme.html redirect
source target regex type code match hits title
/readme.html / 0 url 301 url 0
@sebastianmoran-mainwp
sebastianmoran-mainwp / Command
Created January 29, 2019 04:29
Delete readme.html and wp-config-sample.php files from WordPress installs
rm -f readme.html wp-config-sample.php
@sebastianmoran-mainwp
sebastianmoran-mainwp / .htaccess
Last active January 29, 2019 14:11
Apache and NGNIX redirects for the readme.html file installed by WordPress
<IfModule mod_rewrite.c>
RewriteRule ^readme\.html$ / [R=301,L]
</IfModule>
@sebastianmoran-mainwp
sebastianmoran-mainwp / Commands
Created January 29, 2019 16:32
Delete all MainWP option values using WP-CLI
# delete all mainwp option values
wp option delete _transient_mainwp_child_tran_name_plugin_timestamps
wp option delete _transient_mainwp_child_tran_name_theme_timestamps
wp option delete _transient_mainwp_ein_59EQyHXJhRFylOa1QGZJyjrizI8vVY
wp option delete _transient_mainwp_ein_ak5h4RlahMYHmr7UscuqFbuYnC3XaO
wp option delete _transient_mainwp_ein_D6nV6bKuRGRlI2EOSuW2bVnSPVVZpf
wp option delete _transient_mainwp_ein_lhbqZD1nc2s65L7iabQcqITJXrKKMD
wp option delete _transient_mainwp_ein_PbrrgoHO8O2DHYQkingQBr0BIjGbKZ
wp option delete _transient_mainwp_ein_R9v4u8Tlb75rmXbiWlSdh5C63Em0sa
wp option delete _transient_mainwp_ein_W9P131X43VNKQGkXBYfYH7PlvkAHGh
@sebastianmoran-mainwp
sebastianmoran-mainwp / functions.php
Created January 30, 2019 21:39
MainWP Child Report Plugin reduce number of days data is stored for
$val = get_option('mainwp_wp_stream');
if (!is_array($val)) {
$val = array();
}
$val['general_records_ttl'] = 60; // for example
update_option('mainwp_wp_stream', $val);
@sebastianmoran-mainwp
sebastianmoran-mainwp / Commands
Created February 20, 2019 20:12
Remove ManageWP options left after the worker plugin is removed from WordPress using WP-CLI
# delete all managewp option values
wp option delete mwp_container_parameters
wp option delete mwp_container_site_parameters
wp option delete mwp_core_autoupdate
wp option delete mwp_incremental_update_active
wp option delete mwp_maintenace_mode
wp option delete mwp_openssl_parameters
wp option delete mwp_potential_key
wp option delete mwp_potential_key_time
wp option delete mwp_public_keys
@sebastianmoran-mainwp
sebastianmoran-mainwp / admin.css
Last active February 20, 2019 20:19
Hide the ManagedWP notice in wp-admin in WordPress
.mwp-notice-container {
box-shadow: 1px 1px 1px #d9d9d9;
max-width: 100%;
border-radius: 4px;
display: none;
}
@sebastianmoran-mainwp
sebastianmoran-mainwp / Commands
Created March 1, 2019 03:50
Remove InfinteWP options left after the client plugin is removed from WordPress using WP-CLI
# delete all infitewp option values
wp option delete iwp_backup_table_version
wp option delete iwp_client_action_message_id
wp option delete iwp_client_activate_key
wp option delete iwp_client_all_plugins_history
wp option delete iwp_client_all_themes_history
wp option delete iwp_client_public_key
wp option delete iwp_client_replaced_old_hash_backup_files
wp option delete iwp_client_wp_version_old
@sebastianmoran-mainwp
sebastianmoran-mainwp / Database tables
Created March 1, 2019 04:39
All of the database tables created by InfiniteWP admin panel
iwp_addons
iwp_allowed_
iwp_favourites
iwp_favourites_groups_map
iwp_favourite_groups
iwp_groups
iwp_groups_sites
iwp_hide_list
iwp_history
iwp_history_additional_data