# Hardened Apache Mod_Rewrite Security Rule
# Provided by Aung Khant,http://yehg.net
# Last Updated: 2011-02-24
# Note: You must experiment which strings make access denied in normal clean traffic. Remove such rules. Contact me if you can't.
# Ref: http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html
# rewritecond
# NC = 'nocase|NC' (no case-sensitive)
# OR = 'ornext|OR' (or next condition)
# L = last rule
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
#!/usr/bin/php | |
<?php | |
/** | |
* The Analyzer class. | |
*/ | |
class Analyzer { | |
private $fp; |
Create a file in /usr/local/bin/
and place the below into it.
#!/usr/bin/env bash
pbcopy < /dev/null
Then make the file executable.
Wordpress has its own debugging system that Pantheon customers can leverage. Below is the setup that should be able to work regardless of environment connection mode.
Place this code on wp-config.php
:
if (defined('PANTHEON_ENVIRONMENT')) {
// Wordpress debug settings in Development and Test environments.
if (!in_array(PANTHEON_ENVIRONMENT, array('live'))) {
// Debugging enabled.
if (!defined( 'WP_DEBUG' )) {
define( 'WP_DEBUG', true );
Logged in as [email protected]
Detected that janus is a drupal8 site
Checking for /lando/keys/pantheon.lando.id_rsa
Destroying all current tables in database...
Dropping cache_config table from lando database...
Dropping cache_container table from lando database...
Downloading drush aliases...
[notice] Aliases file written to ~/.drush/pantheon.aliases.drushrc.php.
@pantheon.janus.dev
grep -o '"token":"[^"]*' ~/.terminus/cache/tokens/{EMAIL} | grep -o '[^"]*$'
cat nginx-access.log | awk -F\" '{print $8}' | awk '{print $1}' | sort -n | uniq -c | sort -nr | head -20
ssh-keygen -l -E md5 -f ~/.ssh/id_rsa.pub
Problem: WP is slow or dead when editing pages.
Possible Cause: MySQL slow query related to wp_postmeta or wp_options
SELECT DISTINCT meta_key
FROM wp_postmeta
WHERE meta_key NOT BETWEEN '_'
AND '_z'
HAVING meta_key NOT LIKE '\\_%'
ORDER BY meta_key