Export all content from wordpress

WordPress already has this available under Tools > Export. You can export all of your posts, comments, authors, etc. into an XML file which you can them Import into a new (or not new) installation. I believe this has been part of the core since WordPress 2.1.

Default Plugin Settings Not Writing to Database

I believe the issue is that your function that sets up the settings initially isn’t getting run upon activation. Add a call to your mouldings_register_settings_initial() in the activation hook, like this: function mouldings_activate() { global $wpdb, $mouldings_options; mouldings_register_settings_initial(); if ($mouldings_options === false){ $mouldings_options = array( ‘idea_item_columns’ => ‘4’ ); update_option( ‘mouldings_settings’, $mouldings_options ); } } … Read more

Add custom php database code above

You could use a WordPress action hook. For example, you could add the following code to your themes functions.php file: add_action( ‘init’, ‘your_script_function’ ); function your_script_function() { // your script here } The first line makes WordPress execute the ‘your_script_function’ function on initialization. You can add your script in that function. Alternatively, you could add … Read more

How do I copy a wordpress database?

The same WordPress Codex has a page for backing up your database with phpmyadmin; see http://codex.wordpress.org/Backing_Up_Your_Database You must export and import the database itself – and not do a posts export from the dashboard – to retain all settings, image URLs, etc. Either use phpmyadmin in your host control panel, or you can use it … Read more