Tag Info

Hot answers tagged

12

Anthologize A great option is the Anthologize plugin. It works with WordPress 3.0, allows you to format your book in WordPress itself, and then publish everything automatically to PDF, ePub, and other formats.


6

Why not use the SELECT INTO OUTFILE syntax: $wpdb->query("SELECT * INTO OUTFILE '/path/to/file' FIELDS TERMINATED BY '\t' LINES TERMINATED BY '\n' FROM tracking");


6

It is that simple for Wordpress too. I use the following to back up my WP sites: mysqldump -u <user> -p<pass> --quick --extended-insert <db-name> > backup.sql The mysqldump document gives the details on all the parameters. --extended-insert is quicker when updating a DB from a dump file and makes the dump file smaller. --quick makes ...


5

Try this (you may need to bootstrap WP by loading wp-load.php, depending on where you put this code). $args = array( 'post_type' => 'post', 'post_status' => 'publish', //'posts_per_page' => -1 //uncomment this to get all posts ); $query = new WP_Query($args); while ( $query->have_posts() ) : $query->the_post(); $f = ...


5

Check out http://wp-cli.org/. It's fantastic and I've used the export capability multiple times. More information on wp-cli. WP-CLI is a set of command-line tools for managing WordPress installations. You can update plugins, set up multisite installs and much more, without using a web browser. You will most likely have to install wp-cli. You can find ...


5

Using multisite to develop then export to a single install is a bad idea. For one multisite behaves different than a single install and you want your dev to as close to the production as possible. It's also a pain in the a** to manually export the right db tables then import them into a new database. For developing locally I only use 2 or three WP ...


5

Since the asker really doesn’t want to post the answer … someone has to do it: SELECT wp_users.ID , wp_users.user_email FROM wp_users LEFT JOIN wp_bp_xprofile_data ON wp_bp_xprofile_data.user_id = wp_users.ID, WHERE wp_bp_xprofile_data.field_id = 8 AND wp_bp_xprofile_data.value = 'yes' field_id = 8 being the Field you want to get (in my ...


4

I've written a very simple script that is built to do exactly what you're talking about. Here's the basic process you'll want to follow. On the old server, log-in to PHPmyAdmin and export the database. On the new server, log-in to PHPmyAdmin and create your database. You may need to create a new MySQL user as well, but your web host should be able to ...


4

Your easiest option is to just take a copy of your local database and import it to the server using phpmyadmin or similar. You can then add these 2 options to your wp-config.php file to update the site URL. define('WP_HOME','http://example.com'); define('WP_SITEURL','http://example.com'); That was you will get everything in the database on to the live ...


4

Very likely your settings are there but during your find and replace in sql you may have corrupted the serialised options. If you are doing a mysql dump from site #1 and importing dump to database for site #2, you might want to use my WordPress migration script. Using the WordPress migration script you can have all the options updated with one click, ...


3

create this as a 'export_data.php' file. Then call this php from the link <?php $host = 'localhost'; $user = 'mysqlUser'; $pass = 'myUserPass'; $db = 'myDatabase'; $table = 'products_info'; $file = 'export'; $link = mysql_connect($host, $user, $pass) or die("Can not connect." . mysql_error()); mysql_select_db($db) or die("Can not connect."); $result ...


3

The easiest way would be to look at the code of Si Contact Form (since it already does what you want) and use the same kind of system. Shortly, you'll need methods to do the following: Create an XML (or other format) document of your theme options. Save/Export the XML document. Import the XML document (There's no point in exporting if you can't import it ...


3

Exporting and Importing has been there since at least WordPress 2.1. Probably earlier. It moved into plugins with the release of 3.0, I believe.


3

http://bavatuesdays.com/importing-a-single-wp-blog-to-a-wpmu-installation/ http://sillybean.net/wordpress/migrating-single-wordpress-installations-into-multisite-networks/


3

Try Search and Replace plugin which is A simple search for find strings in your database and replace the string. You can search in ID, post-content, GUID, titel, excerpt, meta-data, comments, comment-author, comment-e-mail, comment-url, tags/categories and categories-description.


3

Turn on pretty permalinks, and run a spider/archiver on the address of your website. This should give you a static site you can place on a CD/DVD/USB drive. You can use a tool such as http://www.httrack.com/ to do the latter part. If you're on linux you can use the following command: # Mirror website to a static copy for local browsing. # This means all ...


3

I agree with Pippin, BackupBuddy is awesome. I've never tried to export a multi-site to single installs, so I can't speak for that - but overall, I'm more than happy I bought the license for that sucker. Saved my life many times. However, I used to develop under Multi-Site, and I stopped doing it - mainly because Multi-Site does behave differently than a ...


3

maybe you can write 2 functions for your options one script to write a txt file to export your options one script to import in your wordpress (add upload field in your option theme page) all of theses functions can be in your functions.php of the theme here is an example of function to write a ini (txt) file function write_ini_file($assoc_arr, ...


3

You should probably not run preg_replace on the meta data for a _wp_attachment_metadata field as the data is serialized. I would recommend instead you write a small script to loop through the images, unserialize the data, update the value, serialize and store the modified array. Here's a sample function which does just that: function ...


3

There are two basic approaches you can take. Use the standard wordpress inport / export plugin manually through the admin. Your custom post type must have the property can_export = true (default = true) If you go this route, there are interesting options for adding extra functionality for users, Check out this tutorial on adding export filters specific ...


3

Unless there is a core Wordpress import filter available for your CMS ( see http://codex.wordpress.org/Importing_Content ) or a plugin for a CMS not covered by core WP ( see http://wordpress.org/extend/plugins/search.php?q=import ), or a Google search for your database schema doesn't reveal anything, you need to roll your own importer. The best way is to ...


3

Blogbooker is a service which takes an XML export of your blog and turns it into a PDF, which could then be uploaded to a self publishing platform.


3

A cursory search doesn't turn up any plugins that do this ... but you could use the built-in exporter as an example for building out your own plugin. It's located in /wp-admin/includes/export.php. Essentially, it's a PHP page that queries the database to get all of your posts, then dumps the content into a pre-build XML template that can be imported later. ...


3

Problem is that meta values are not unique key/value data. E.g. with the key 'OneKey' you can have a lot of values for the same post. So, in a flat table, for the column 'OneKey' you should have multiple rows where the post id is the same and seems to me is not what you want. Sure, you can take ony one value treating all meta key as singular, but also a ...


2

The default exporter will do this. Instead of selecting "All Content", choose "Post" and then a category.


2

The data in the options table is stored as serialized arrays. Use get_option() to get the data and unserialize them. array_walk( get_option( 'widget_text' ), function( $d ){ if ( ! empty( $d['title'] ) ) { printf( '<p>Title: %s<br>Text: %s</p>', $d['title'], htmlentities( $d['text'] ) ); } } ); If ...


2

I would not export and import posts as a remote publishing strategy. That is going to be a lot of trouble and probably prone to error. You will also have issues with media uploads that you will have to sync between the local and remote servers and with file URLs that you will have to constantly update with something like Velvet Blues Update URLs. I expect ...


2

The data for Currently Active Menus is not included in the exports (by default). This is because there is no guarantee the importing site will have the same theme (or same named menus). If changing the menus was a big deal, you could export/import all the data straight out of the database. (This option is strongly discouraged!)


2

Your code is messy, but seems ok. The only thing you need to do is to decode the $_POST'ed data on import, so instead of: update_option( $shortname . '_settings', $_POST['kittens_import_settings'] ); use: if(isset($_POST['kittens_import_settings']) && current_user_can('edit_themes')){ $imported_settings = ...


2

The WordPress .xml import file only contains post data and not any site settings, such as permalinks. It seems to me that this is only an issue of setting the permalinks the same way of your old site. Settings -> Permalinks (/wp-admin/options-permalink.php) select Day and name save changes If WordPress can't update the .htaccess file, follow this ...



Only top voted, non community-wiki answers of a minimum length are eligible