Tag Info

Hot answers tagged

6

if you check the Wordpress importer plugin it is easy to implement this feature. But if you want the direct answer , here it is First of all, we need to copy the Wordpress importer plugin files to our theme directory. like this 1. themes/bootstrapguru_theme/inc/wordpress-importer.php 2. themes/bootstrapguru_theme/inc/parser.php you can find ...


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


2

I guess you want to modify these lines in the WordPress-Importer plugin: $post_exists = post_exists( $post['post_title'], '', $post['post_date'] ); if ( $post_exists && get_post_type( $post_exists ) == $post['post_type'] ) { to add some post meta checks. I don't see any hooks inside the function post_exists() that we could use. Remark: I don't ...


1

I've just had this or a very similar problem (I didn't use the WP export tool, but instead did a manual migration from one environment to another). As far as I can tell, the problem occurs because of how WP stores the thumbnail data in the the wp_postmeta table (with the key '_wp_attachment_metadata'). This data is serialised, so it's possible/likely ...


1

I've created a patch that will work around this issue. This patch is for WordPress 3.6.1. It is a hack, not something that should be taken very seriously except that it points out where the problem may be. I don't know PHP, but was able to trace it back to this point before giving up. I expect someone with more familiarity with the WordPress code base could ...


1

Export the posts via the exporter at wp_admin->Tools->Export and bundle the resulting file. Provide the end user with instructions for importing them-- basically, install the WordPress importer and then visit wp_admin->Tools->Import. Please do not try to force installation of your posts automatically as it will insert data into the user's ...


1

It's not difficult. You need to transfer files to the new server. Create a blank database and keep it's name, user_name (this user must have all privileges of this newly created database) and password. Edit config.php file on new server with the these new details. Read: Wordpress Codex for transferring site


1

Admittedly, this is a guess. The exporter, in the versions I have used, does not save your files to a local disk. It creates an XML file with references to your images on a server somewhere. When the importer reads the XML file, it will download from that server and upload to your new installation. If your images are not available-- not accessible for ...


1

You can get all ids of featured images querying the "post_meta" table for "_thumbnail_id" (as Milo said) in the "meta_key" column and selecting the "meta_value" column. Then replace your values in the same "post_meta" table where "post_id" are the ones above and "meta_key" is "_wp_attached_file" and / or "_wp_attachment_metadata" Hope that makes sense


1

Worst case scenario, just make a new environment, with that theme (can even be on the live), then just re-upload the CSS and anything else you've edited (successfully that is).


1

Have you checked out Create A Network on the codex? Essentially: Add define( 'WP_ALLOW_MULTISITE', true ); to your wp-config.php Access Tools > Network Setup from the admin menu & follow the instructions.


1

When you generated your export file, was it on a live server or a localhost? Is that web page still accessable? If the media import fails, it means the images, as linked out of the XML, are coming up 404. Open up the XML file and see where the images are pointing. If we open up the Theme Unit XML file, we will see lines like this: ...


1

There's a application you can download to split large XML/WXR files into smaller files Or you can change the upload & post limits in your php.ini file in cPanel.


1

If you have already created the database that you wish to import into and you have selected that database in PHPMyAdmin, but the import file is trying to create a new database, then you will see this error message. All you need to do is open up the SQL file in a text editor and delete the line that begins with CREATE DATABASE (it will be very near the top ...


1

From what I can see, you are inserting data in table wp_commentmeta. However the column meta_id has a Primary Key restriction. You can see the table definition at http://codex.wordpress.org/Database_Description#Table:_wp_commentmeta As meta_id has a Primary Key restriction, this column may only hold unique values. The insert statements you have posted show ...


1

Sounds like a sound approach to me! Not enough rep to comment so I'm posting an answer... Only advice I'd have is to 1. Make sure character encodings are correct so you don't end up with a bunch of "æÃ" 's 2. Make database backups :-) As to ACF, I think it's pretty much the same as the "add_post_meta" function. Maybe it has a separate one in its API. But ...


1

In WordPress, user's Biography is saved in User Meta table with description key.


1

Nope, the WP is pretty flexible about this and will perfectly handling omitted fields. Including assigning IDs (which is actually best left to it, outside of edge cases when exact IDs must be imported). The only situation that natively won't let you create post is if neither of title/content/excerpt is provided and post type supports any of them. Even then ...



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