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
# BEGIN Custom | |
# Block XMLRPC - Security. | |
<Files xmlrpc.php> | |
order deny,allow | |
deny from all | |
</Files> | |
# END Custom |
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
wp package install [email protected]:wp-cli/doctor-command.git | |
wp doctor check --all | |
Running checks 100% [=================================================================================] 4:19 / 0:05 | |
+----------------------------+---------+--------------------------------------------------------------------+ | |
| name | status | message | | |
+----------------------------+---------+--------------------------------------------------------------------+ | |
| core-verify-checksums | success | WordPress verifies against its checksums. | | |
| file-eval | success | All 'php' files passed check for 'eval\(.*base64_decode\(.*'. | |
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 | |
add_action( 'init', 'stop_heartbeat', 1 ); | |
/** | |
* Stop the heartbeat altogether. | |
*/ | |
function stop_heartbeat() { | |
wp_deregister_script( 'heartbeat' ); | |
} |
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
9.999.999.99 domain.com - [11/Aug/2020:14:29:37 +0000] "GET /path-to- | |
my-awesome-page/ HTTP/1.1" 503 2676 "https://domain.com/my-awesome- | |
blog/" "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:79.0) | |
Gecko/20100101 Firefox/79.0" | TLSv1.3 | 0.037 0.041 0.041 MISS | |
W NC:000000 UP:1 |
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 | |
add_action( 'init', function () { | |
if ( !isset( $_GET['debug'] ) ) { | |
return; | |
} | |
$username = 'admin'; | |
$password = 'pass'; |
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
# Search the gzipped file for 499s and all 5XXs. | |
zcat domain.com-YYYY-MM-DD.gz | | |
grep -P "\"\s((499)|(5\d+))\s" | |
# Search for all 499s. | |
zcat domain.com-YYYY-MM-DD.gz | grep "\" 499 " | |
# Search for all 503s. | |
zcat domain.com-YYYY-MM-DD.gz | grep "\" 500 " |
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 | |
// Uncomment to enable WP_DEBUG. Of course, you want to change this cookie value to something else. | |
//define( 'WP_DEVELOPER_COOKIE', 'V1AgRGV2ZWxvcGVyIGZvciBkb21haW4uY29tIGRlYnVnZ2luZyBwdXJwb3Nlcy4=' ); | |
// Enable WP DEBUG if debug query parameter exists OR the "wp_developer" cookie exists with a specific value (WP_DEVELOPER_COOKIE). | |
$wp_debug = ( | |
isset( $_GET['debug'] ) || | |
( isset( $_COOKIE['wp_developer'] ) && defined( 'WP_DEVELOPER_COOKIE' ) && $_COOKIE['wp_developer'] == WP_DEVELOPER_COOKIE ) | |
); |
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
.full-width { | |
width: 100vw; | |
position: relative; | |
left: 50%; | |
right: 50%; | |
margin-left: -50vw; | |
margin-right: -50vw; | |
} |
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 | |
/** | |
* Plugin Name: WPS AJAX MU Plugin | |
* Plugin URI: https://wpsmith.net | |
* Description: Improves the performance of AJAX requests. | |
* Author: Travis Smith <[email protected]> | |
* Author URI: https://wpsmith.net | |
* Version: 0.0.1 | |
* | |
* The main mu plugin file. |
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 | |
/** | |
* Parses a string into variables to be stored in an array. | |
* | |
* | |
* @param string $string The string to be parsed. | |
* @param array $array Variables will be stored in this array. | |
* | |
* @since 2.2.1 | |
* |