View regex.txt
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
^https:\/\/www.domain.com(?!.*(?:exclude1|exclude2)).*(?:include1|include2|include3).*$ |
View wp-user-login-time.sql
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
SELECT u.id, u.user_login, u.user_email, u.user_registered, | |
from_unixtime( | |
trim( trailing ';}}' from | |
RIGHT( | |
um.meta_value, | |
(LENGTH(um.meta_value) - LOCATE('login',um.meta_value) - 8) | |
) | |
) | |
,'%Y-%m-%d') as last_login | |
FROM wp_users u, wp_usermeta um |
View error-output.php
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 | |
#put these at the top of any PHP file to output server errors | |
ini_set('error_reporting', E_ALL); | |
ini_set('display_errors', 'On'); |
View table-size.sql
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
SELECT | |
table_schema as `Database`, | |
table_name AS `Table`, | |
round(((data_length + index_length) / 1024 / 1024), 2) `Size in MB` | |
FROM information_schema.TABLES | |
ORDER BY (data_length + index_length) DESC; |
View filesizes.sh
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
#Show a list of the largest files (change "/wproot" to the actual root folder) | |
find /wproot -type f -exec du -Sh {} + | sort -rh | head -n 20 | |
#Show size of WP root folder | |
du -sh /wproot | |
#Show size of wp-content folder | |
du -sh /wproot/wp-content | |
#Show size of uploads folder |