Skip to content

Instantly share code, notes, and snippets.


Review Squirrel reviewsquirrel

View GitHub Profile
View Disable WordPress login hints using functions.php
function no_wordpress_errors(){
return 'Nothing to see here, move along!';
add_filter( 'login_errors', 'no_wordpress_errors' );
View Add HTTP secure headers using .htaccess
<IfModule mod_headers.c>
Header set Strict-Transport-Security "max-age=31536000; includeSubDomains"
Header set X-XSS-Protection "1; mode=block"
Header set X-Frame-Options "sameorigin"
Header set X-Content-Type-Options "nosniff"
Header set Content-Security-Policy "default-src 'self' 'unsafe-inline' 'unsafe-eval' https: data:";
View Add Cookie with HTTPOnly and Secure flag using functions.php
View Update options table SQL
UPDATE `newprefix_options` SET `option_name` = 'newprefix_user_roles' WHERE `option_name` = 'wp_user_roles'
View Update the usermeta table SQL
UPDATE `newprefix_usermeta` SET `meta_key` = REPLACE( `meta_key`, 'wp_', 'newprefix_' )
View rename table sql
RENAME table `wp_links` TO `newprefix_links`;