codeSnippets(All);

Block PHP in wp-includes, wp-content & uploads

<FilesMatch "\.(?i:php)$">
 <IfModule !mod_authz_core.c>
 Order allow,deny
 Deny from all
 </IfModule>
 <IfModule mod_authz_core.c>
 Require all denied
 </IfModule>
</FilesMatch>

Showing 9 lines of 48 total lines in this snippet.

Change WP Database Prefix

UPDATE `newprefix_options` SET `option_name`=REPLACE(`option_name`,'wp_','newprefix_') WHERE `option_name` LIKE '%wp_%';
UPDATE `newprefix_usermeta` SET `meta_key`=REPLACE(`meta_key`,'wp_','newprefix_') WHERE `meta_key` LIKE '%wp_%';

Showing 2 lines of 7 total lines in this snippet.

Load Google Web Fonts Asynchronously

<script src="https://ajax.googleapis.com/ajax/libs/webfont/1.5.18/webfont.js"></script>
<script type="text/javascript">
 WebFont.load({
 google: {
 families: ['Ubuntu:300,400,600,700', 'Dosis:400']
 }
 });
</script>

Showing 9 lines of 9 total lines in this snippet.

Cron Job No Output

*/5 * * * * php -q /home/user/script.php > /dev/null 2>&1

Showing 1 lines of 3 total lines in this snippet.

Email from Cron Job

*/20 * * * * php -q /home/user/script.php | mail -s "Email Subject" you@yourdomain.com

Showing 1 lines of 3 total lines in this snippet.

SQL replace text in column

UPDATE table SET column = replace(column, 'text', 'replacement');

Showing 1 lines of 3 total lines in this snippet.