How to stop xmlrpc attacks without disabling component to allow JetPack to work in WordPress?

With a whitelist, you typically deny all first, then allow. Then just keep adding Allow entries as needed. Try this: <Files xmlrpc.php> Order Deny,Allow Deny from all Allow from 122.248.245.244/32 Allow from 54.217.201.243/32 Allow from 54.232.116.4/32 Allow from 192.0.80.0/20 Allow from 192.0.96.0/20 Allow from 192.0.112.0/20 Allow from 195.234.108.0/22 Satisfy All ErrorDocument 403 http://127.0.0.1/ </Files> Note: … Read more

How to make wp_enqueue_style and wp_enqueue_script work only on custom post type

You can use conditionals: <?php add_action( ‘wp_enqueue_scripts’, ‘wpse_enqueues’ ); function wpse_enqueues() { // Only enqueue on specified single CPTs if( is_singular( array( ‘anime’, ‘manga’ ) ) ) { wp_enqueue_style( ‘wp-manga-plugin-css’, WP_MANGA_URI . ‘assets/css/style.css’ ); } } ?> If you need the CSS on archives as well, that’s another condition: if( is_singular( array( ‘anime’, ‘manga’ ) … Read more

How to remove Database Table in WordPress via Function file?

Add this to functions.php function delete_wpbr_rank_math_sc_analytics() { if ( ! isset( $_GET[‘delete_wpbr_rank_math_sc_analytics’] ) ) { return; } global $wpdb; $wpdb->query( “DROP TABLE IF EXISTS wpbr_rank_math_sc_analytics” ); } add_action( ‘admin_init’, ‘delete_wpbr_rank_math_sc_analytics’ ); Visit this URL: https://yoursite.com/wp-admin/?delete_wpbr_rank_math_sc_analytics Obviously change “yoursite.com” to your actual domain. I made it so you have to visit a specific URL so it … Read more

Im unable to login to my wordpress

It looks like your site has tried to update from 5.4 to 5.5 but failed, and you’re left with a mix of the two versions that doesn’t work. in 5.4, wp-settings line 70 called wp_unregister_GLOBALS() which was defined in wp-includes/load.php, loaded from wp-settings line 34 in 5.5, wp_unregister_GLOBALS has been deprecated and a placeholder is … Read more