Export / import WordPress database

I normally use mysqldump and sed: on old server: mysqldump -u user -p OldWpdatabase > wpdb.sql sed -i ‘s/oldurl/newurl/g’ wpdb.sql on new server: mysql -u user -p NewWpdatabase < wpdb.sql sed is used to search and replace all the hard coded occurrences of the website if needed.

Update Attached Image Size after Import

I’ve just had this or a very similar problem (I didn’t use the WP export tool, but instead did a manual migration from one environment to another). As far as I can tell, the problem occurs because of how WP stores the thumbnail data in the the wp_postmeta table (with the key ‘_wp_attachment_metadata’). This data … Read more

WordPress export tool doesn’t export post-format value of custom post type?

After spending time debugging export.php, I found that we have to register post_format taxonomy for our custom post type. register_taxonomy( ‘post_format’, ‘portfolio’, array( ‘public’ => true, ‘hierarchical’ => false, ‘labels’ => array( ‘name’ => _x( ‘Format’, ‘post format’ ), ‘singular_name’ => _x( ‘Format’, ‘post format’ ), ), ‘query_var’ => true, ‘rewrite’ => $rewrite[‘post_format’], ‘show_ui’ => … Read more

Unknown collation when I import a dump from an existing site into a development database?

This issue is as a result of your server not supporting the utf8mb4_unicode_520_ci collation type. To resolve this you should convert the collation for all tables with utf8mb4_unicode_520_ci to utf8_general_ci If you’re exporting through phpmyadmin, you can: Click the “Export” tab for the database Click the “Custom” radio button Go the section titled “Format-specific options” … Read more

Imported thumbnails have incorrect URL

The easiest way is to use the Cache Image plugin, which ‘sideloads’ images in your posts that are from other domains. I’ve had mixed results, mainly because it seems to not work well for thousands of posts and images – if your site is smaller you may have better results.

Moving wordpress site to subpage of another site

This is how I would do it: Log into “other organization” install All In One WP Migration make a copy of your site download said copy In site.com Create a directory called acquiredpages install a blank copy of WordPress log into your blank wordpress install All In One WP Migration run the migration with the … Read more

Is comment metadata included in the export file?

My latest export from my blog (WP 3.3.1) now has the commentmeta in the XML. It’s in this format: <wp:comment> <wp:comment_id>…</wp:comment_id> … <wp:comment_user_id>0</wp:comment_user_id> **<wp:commentmeta> <wp:meta_key>name_of_meta</wp:meta_key> <wp:meta_value><![CDATA[value_of_meta]]></wp:meta_value> </wp:commentmeta>** </wp:comment> I was looking for information on it while trying to write an exporter from another system. Not much information available online so I tried an export from … Read more

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