Exporting Forum data from BBPress

This is how to export data from BBPress, which would be useful if you wanted to migrate from BBPress to another forum platform. Its straight SQL export direct from the mysql database, with things like forum posts (topics ) and forum replies, as well as some other data including users ( and their user ids … Read more

SQL for use in migrating a Drupal website to WordPress

Currently I’m working on migrating a Drupal 7 website to WordPress, in the process I’ve learned alot about the Drupal database schema. So this post is a place for me to store handy queries and notes. Its a Work in Progress so I’ll add more over the coming weeks. Content types in Drupal are similar … Read more

WordPress SQL snippets

A place to keep snippets of useful WordPress SQL. Do a select based on some meta field of a post ( i.e. search for a post that has a particular metafieldĀ  ) SELECT p.ID,p.post_title, MAX(CASE WHEN pm1.meta_key = ‘id_vim_node’ then pm1.meta_value ELSE NULL END) as field_i_want FROM wp_posts p LEFT JOIN wp_postmeta pm1 ON ( … Read more

Importing a MAMP mysql database on mac (OS X Yosemite)

How to import a MAMP mysql database (bypassing phpmyadmin problems) Recently I’ve being have a problem importing a large database in MAMP Mysql via phpmyadmin (and after altering various php variables in php.ini, I still couldn’t get it to import). So I tried another approach to import it from the command line a quick google … Read more

Handy Woocommerce SQL queries

This post is just a place to store handy SQL queries for Woocommerce. Get Order and all its information select p.ID as order_id, p.post_date, pm.* from wp_posts p join wp_postmeta pm on p.ID = pm.post_id join wp_woocommerce_order_items oi on p.ID = oi.order_id where post_type = ‘shop_order’ and p.ID = 14223 Generate an Orders report and … Read more