This file contains hidden or 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
# getting stuff out | |
mysqldump --default-character-set=utf8 --max_allowed_packet=32M --opt -hHOST -uUSER -pPASSWORD DATABASE > database.sql | |
# getting stuff in | |
mysql --default-character-set=utf8 --max_allowed_packet=32M -hHOST -uUSER -pPASSWORD DATABASE < database.sql |
This file contains hidden or 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
/* Kill attachment, search, author, daily archive pages */ | |
add_action('template_redirect', 'custom_template_redirect'); | |
function custom_template_redirect(){ | |
global $wp_query, $post; | |
if (is_author() || is_attachment() || is_day() || is_search() || is_category()) | |
{ | |
$wp_query->set_404(); | |
} | |