Why are 404s not triggering my 404.php template?

I found that the problem was with the otherwise very useful plugin Legacy URL Forwarding. It uses the following function (abridged here) with the 404_template hook. function doUrlForwarding() { // make a $query based on the $_SERVER[‘REQUEST_URI’] // if a post is found, redirect to it if (!empty($query->post->ID)) { wp_redirect(get_permalink($query->post->ID), ‘301’ ); } } add_action(‘404_template’,’doUrlForwarding’); … Read more

Moving local wordpress page to a real server subdomain broke my permalinks?

You have to change other URLs in the database, not just in the wp_options tables. Use these queries in phpmyadmin to change post links and metadata within post and page content: UPDATE wp_posts SET guid = replace(guid, ‘http://www.olddomain.com/’,’http://www.newdomain.com/’); UPDATE wp_posts SET post_content = replace(post_content, ‘http://www.olddomain.com/’, ‘http://www.newdomain.com/’); UPDATE wp_postmeta SET meta_value = replace(meta_value, ‘http://www.olddomain.com/’, ‘http://www.newdomain.com/’); Reset … Read more

How can I send an email in my plugin?

Use wp_mail(), not just mail(). It is a wrapper for PHPMailer, a class that takes care for many problems the native mail() function often gets. See my plugin 404 Tools for how to use it in this case. To send an HTML email see Milo’s answer to a related question.

Getting 404s on New Pages

WordPress is not receiving requests, check if mod_rewrite is enabled and an .htaccess file is being generated by WordPress (assuming you are using Apache, not IIS). See using pretty permalinks and fixing permalink problems for more info.

Changing the post date without causing 404 error

You’ll need to add 301 redirects for the old URL to the new one. Your best bet is to do this via .htaccess, in your theme, or using a plugin like one of these: http://wordpress.org/plugins/simple-301-redirects/ http://wordpress.org/plugins/safe-redirect-manager/ Edit: Another option OPtion 2 would be to disregard the date in the URI altogether. You could unset them … Read more