Tag Info

Hot answers tagged

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

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

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, ...


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

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 = ...


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

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


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'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 ...


3

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 ...


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

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 ...


2

Is the migration down to the fact you're moving servers and/or domains? Or that your merging into another blog? If the former, you might be better off with a database dump (search and replace old domain with new one if that's changing too), then import into the new database (along with copying over the filesystem). If it's the latter, well, it's not going ...


2

a quick and dirty way to do this is by running this ONCE: global $post; $posts = new WP_Query(); $posts->query(array('posts_per_page' => -1, 'post_type' => 'post')); while ($posts->have_posts()): $posts->the_post(); $post->post_content = wpautop($post->post_content); // replaces new line chars with <p>'s ...


2

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 ...


2

Hi @janoChen To export everything in the database, go to your hosting provider's control panel such as CPanel and find out how to do "an SQL dump". An SQL dump is a text file containing the SQL script to rebuild your database on your local computer. You can often do that in software your host may provide named phpMyAdmin. Alternately you could use a ...


2

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 301s. Edit: in fact there seem to be two such scripts already, ...


2

If you're going from WP to WP, then you want to use the built-in exporter and importer. Your links should come along with it. I'm not sure about the categories with it, but this might help http://ellejohara.com/blog/making-the-wordpress-opml-tool-slightly-more-useful/


2

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> ...


2

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.


2

In your WordPress Dashboard, if you go to Tools > Export, you can select your custom post type and export only posts in that post type. It gives you the option between All Content, Posts, Pages, and your custom post types following those three options. As for SQL, well are you looking to export the data from something like phpMyAdmin? You could use ...


2

With the help of @toscho pointing out get_post();, I was able to spit out a .csv with a blank template. At first, I had memory limit issues b/c of the amount of data, so I moved the site locally and was able to get everything I need with the get_post(); This is the gist of it: <ol> <?php global $post; $args = array( 'numberposts' => -1, ...


2

I would setup your Website B, add a user through the control panel, then view what tables in the database they were added to and what extra fields were set. Then use Navicat or phpmyadmin to dump users from Website B into excel, combine the users from Website A, set any missing fields then import to Website B


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 ...


2

I'm just about done adding my own admin panel class an Import/ Export functionality and I've come to a point where i feel the best way to export data would be as a base64 encoded serialize array, and this is way, serialize data alone is somewhat human readable and i wonted to avoid that (theme options have stored files,images url , paths and other ...


2

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 ...


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

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. ...


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 ...



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