Tag Info

Hot answers tagged

28

This is where your problem is: I then edited the resulting .sql file to update all of the file paths and URL references to point to our production site. You can't do that. WordPress stores many options as "serialized data", which contains both the string content of things and their length. So when you modify the URL and the length changes, then ...


13

Your question is a bit specific if you "only" want to automatically import some posts/pages. There are other ways to do this then using a XML export file. If you have text-only posts, then you should use LOAD DATA INFILE. At first you have to export your posts. global $wpdb, $wp_filesystem; $tables = array( 'posts' => array( 'posts', ...


8

First of all you need to find out which hashing algorithm has been used on the Joomla site to store the passwords. Joomla - different to Worpdress - ships with a variety of hashing algorithms. If you have found out how the hashes have been generated, you can port the hashing function over into wordpress and make use of a pluggable function called ...


6

Put list in PHP array, loop through it, use wp_insert_term() on each.


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


6

how is "already present" defined here anyway (post_id? term_id? name)? The post title and date must match to be already present. The WordPress post_exists() function is used to determine if the post exists. From the plugin code: $post_exists = post_exists( $post['post_title'], '', $post['post_date'] ); The is no filter provided to change this ...


5

When I use WordPress Import in this cases, this is what I do: Export the XML in localhost. Open the exported file in a text editor. Search and replace http://localhost/wp-content/uploads/ for http://example.com/custom-temporary-folder/. Upload the uploads folder via FTP to the custom-temporary-folder. Perform the Import in example.com using the modified ...


5

Sounds like you have successfully gotten all 300 Pages imported based on the comments. (Regardless of how you did it, either by using the WordPress import plugin or by using some MySQL tool like phpMyAdmin or Sequel Pro or whatever)... You have 300 pages in the wp_posts table. Let's start from here then... The ACF plugin uses the wp_postmeta table to ...


4

As an alternative, when you use the Wordpress Export tool, you can open the XML file that is exported in any text editor (I used Notepad++). I did a simple find a replace on this line: <wp:post_type>post</wp:post_type> and replaced with: <wp:post_type>blog</wp:post_type> This took all my old "posts" and made them into my new ...


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

Allow me to re-introduce 2 things here: (a) "I am not asking how to... I've got that part sorted..." »» I've learnt over time to be OK with the fact that the approach to issues/fixes doesn't necessarily require some 'visible association' with the issue at hand. (b) "...would I have to do to strip out the parts..." "...clients are tradesmen, so even ...


4

If it is an older version of WP, you need to find out what version of WP generated the database, as WP upgrades the DB most times the files are upgraded and you should incrementally upgrade to also upgrade the database. Look in the wp_options table for option 711 and see what the version is; option name will be site_transient_update_core and the value will ...


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

Otto's answer is spot-on. I also discovered this the hard way. However, I managed to work around this using a cool script at http://spectacu.la/search-and-replace-for-wordpress-databases/ To migrate your wordpress and to a new url / domain name, do the following: Take a DB dump (e.g. using phpmyadmin) of the existing wordpress Restore the dump as-is, ...


4

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


4

To be ON TOPIC on the QUESTION (firefox) i dont think the approach to use delicious as intermediate step is preferred because: you lose the hierarhical taxonomy applied in firefox (they way you structured things) you lose the favicons as gathered in firefox you lose the information added by dividers between links you lose information on the order of ...


3

There are 3 ways you can import content from Word: Paste from Word There's a button in the editor that allows you to paste content directly from Word. This removes the special formatting Word uses to lay content out on the page and will make things work well on your site. (The button is in the "Kitchen Sink" on the Visual editor and is circled in the ...


3

To deal with this issue I always use WordPress Serialized Search & Replace tool provided here. It works perfectly fine. I have been using this for sites. This really take care of the issues with migrating development database to production. http://interconnectit.com/products/search-and-replace-for-wordpress-databases/


3

You can use this plugin: http://wordpress.org/extend/plugins/regenerate-thumbnails/.


3

I solved the problem... my source blog was private i.e. required password... I made it public for couple of minutes, and importer plugin did it's job properly!


3

Try the Tumblr Importer. :) http://wordpress.org/extend/plugins/tumblr-importer/ Let me know if you have any problems with it, we're actively trying to improve 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

I think you have two options (third if you find any plugins). I think if you export data from one WP, the users are also copied. The drawback is that you have to import all the content as well. The second option is to export the users from MySQL using PHPMyAdmin. Just export the user table. If you want to include privilidges as well, you have to export ...


3

Answers: Is post_guid the image location reference? Or is the path to the image stored somewhere else? $post->guid is the record in a post which holds the URL for your attachment. Where is featured image set? featured image is saved as post meta so use update_post_meta() once you have the attachment id: update_post_meta( $post->ID, ...


3

Install WordPress as multi-site, choose the option sub-directories. Your main blog will now under example.com/. Create a second sub-site and set its slug to portugueseblog. This site will now be accessible under example.com/portugueseblog. Now import the content from the old blogs into the new one.


3

The built-in import mechanism can only fetch file attachments that are accessible over the internet - which will normally not apply to your local WP install. The best option is to dump the whole database and do an MySQL import on the receiving domain. Your image files and other attachments need to be ftp-ed to the production server. However, your local and ...


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


2

Hook int force_filtered_html_on_import and return FALSE. See ticket #14818. add_filter( 'force_filtered_html_on_import' , '__return_false' ); By default this is set to TRUE in wp-includes/ms-default-filters.php.


2

Its not that $wpdb->query does not need $wpdb->prepare(), it's because of not using $wpdb->prepare() in a correct manner. In your case $wpdb->prepare() never received any values which it must. Please refer to the Codex for details about using $wpdb->prepare().



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