How to assign name the WordPress export.xml file

By default, the filename is defined in /wp-admin/includes/export.php: $sitename = sanitize_key( get_bloginfo( ‘name’ ) ); if ( ! empty( $sitename ) ) { $sitename .= ‘.’; } $date = gmdate( ‘Y-m-d’ ); $wp_filename = $sitename . ‘WordPress.’ . $date . ‘.xml’; And you can filter it: $filename = apply_filters( ‘export_wp_filename’, $wp_filename, $sitename, $date ); So … Read more

Migrating to Tumblr [closed]

I’m thinking if there’s no easy way, I could process a WordPress export and use the Tumblr API write method to re-create all the posts, including date and slug… the URLs are likely to end up a little different, though, so I might need to use some mod-rewrite magic until Google picks up on the … Read more

Importer fails to import every post

Open the WXR in a text editor and see if it contains posts from later years. If not, you will need to revisit your export settings from WP.com to make sure you’re pulling all posts. If it does contain posts from these years, there might be a non UTF8 character breaking the import. You should … Read more

How to modify admin headers

Not a direct answer, but: for simple data exports on the admin side, I generally just use the AJAX API. Set up an AJAX handler for your export: /** * export from admin */ function wpse_126508_export() { header(‘Content-Type: text/xml; charset=utf-8’); header(‘Content-Description: File Transfer’); header(‘Content-Disposition: attachment; filename=wpse_126508_export.xml’); $xml = new XMLWriter(); $xml->openURI(‘php://output’); $xml->startDocument(‘1.0’, ‘UTF-8’); $xml->startElement(‘wpse_126508_export’); // … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)