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

Prevent WordPress from interpreting a subfolder?

To exclude a directory and all virtual requests to it, extend the regular rules: # WordPress # Images, Stylesheets etc. don’t need a HTML 404 RewriteCond %{REQUEST_URI} !.+\.\w{2,4}$ # Existing file RewriteCond %{REQUEST_FILENAME} !-f # Existing directory RewriteCond %{REQUEST_FILENAME} !-d # Symbolic link RewriteCond %{REQUEST_FILENAME} !-l # Do not touch the directory ‘clients’ RewriteCond %{REQUEST_URI} … Read more

How to find out which function is causing a 404

Go to http://[your-site].com/wp-admin and have a look in the Posts or Pages menu (or if it’s a custom post type, the edit screens for your post type). Also, if it’s indeed there, check your permalinks (Settings > Permalinks) and save them even if you don’t make any changes. This will flush the permalinks, which might … Read more