Tag Info

Hot answers tagged

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


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

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

Unit tests aren't meant to be imported by the WordPress Importer plugin. There's a slight misunderstanding. What you're trying to import are real Unit tests more on Wikipedia, while the purpose of that plugin is to import XML export files - exports of posts, pages, etc.


2

Your XML file includes the following instructions. Log in to that site as an administrator. Go to Tools: Import in the WordPress admin panel. Install the "WordPress" importer from the list.* Activate & Run Importer. Upload this file using the form provided on that page. You will first be asked to map the authors in this export file to users on the site. ...


2

if you have access to the .htaccess file in your www folder. Just include the following 2 lines in .htaccess: php_value upload_max_filesize 50M php_value post_max_size 50M Other way .. you can place this piece of code in your theme's functions.php file @ini_set( 'upload_max_size' , '50M' ); @ini_set( 'post_max_size', '50M');


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

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

I am working on redesigning a fairly high profile blog. I suggested the best way to do that, rather than mockups, is to just upload their wordpress export to a new WP install on domain. I periodically (twice a year or so) pull the database from our primary site and import into a dev site. Other than the couple of caveats with moving a site, it ...


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

According to the codex, you should be able to split the XML file into pieces and import them separately. Here is how I would do it. The WordPress XML export file is in a format they call WordPress eXtended RSS (WXR), and looks like this (some lines left out): <?xml version="1.0" encoding="UTF-8" ?> <rss version="2.0" > <channel> ...


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