Hot answers tagged

7

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


7

W3-Total Cache has a feature that will scan all your posts and import any external images into the media library and change the paths to the new location. See Screenshot


6

A new file, import.php: <?php define('WP_INSTALLING', true); // this is required. i forget why! include '/path/to/wordpress/wp-load.php'; include ABSPATH . WPINC . '/registration.php'; // wp_insert_user() $userdata = array('user_login' => 'jdoe', 'user_pass' => 'foobar'); $user_id = wp_insert_user($userdata); Check wp_insert_user() for other ...


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

There is this plugin: Automatic Featured Image Posts Plugin From the plugin page: Automatic Featured Image Posts creates a new post with a Featured Image every time an image is uploaded. Through the plugin settings page, you can set the image to publish and assign itself to one of your other existing custom post types and/or post formats. Basically, ...


4

This script is a proof of concept (tested and working), it is not a plugin and is meant to be hacked with, it assumes a few things: It uses wp_insert_post so it's advised you do not hook it into any admin hooks, so just run it once! The images must be in the wp-content\uploads folder, changing this would require more hoops to jump through. The example ...


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


4

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

Wordpress should behave the same, only dependent on your server resources. I hope you have a dedicated server because if not then you will experience severe outages and possibly cancellation of your hosting service. Wordpress is merely databases and PHP, so amount of files will not affect its use. It is stable. You could have a billion or trillion or ...


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

How can I write a bulk MySQL command to add in the value wp_capabilites='a:1:{s:10:"subscriber";b:1;}' into each user_id except 1, 2 and 3 ie. the newly imported users? You don't. That is a serialized array which is a PHP construct. MySQL has no idea what to do with it. To the database, it is just an string. To PHP it is a representation-- a diagram-- ...


3

The post that an attachment is related to is determined by the post_parent column on the wp_posts table (depending on your database prefix). Set it to the post_ID of the parent post.


2

The correct place is the current setting I would say. So if you now use one upload folder (instead of years / month subfolders) go with that one (might get very full, but easier to sort. So just moving all files from the year / month subdirectories into the uploads directory and changing the URL-Paths in the database should normally do the job. After all is ...


2

Afaik: There's a (hidden?) button for TinyMCE that cleans up stuff imported from MS Word. You click the button insert (copy/paste) the stuff from Word and TinyMCE should do the rest. Second: You can export as XML from InDesign. Why not use that? Pulling in XML data should be much easier. I'm pretty sure that you could also add a new table in DB for the XML ...


2

Not my area, but this article made some splash in WP news recently - How To Run A News Site And Newspaper Using WordPress And Google Docs. It mentions InDesign integration as well (although in opposite direction, import from WordPress) and that all code is open source.


2

Googling for "split wxr file" returned several results, including python script for splitting .wxr file GUI for splitting WXR files (OSX and Windows) .Net splitter for WXR files Haven't tried any of these, but the comments look positive.


2

I relentlessly searched and read until I found an answer! Turns out, the right thing to use is actually MetaWeblog API and XMLRPC, which you'll have to activate as it is disabled by default. First thing, visit the Settings menu in your admin panel and navigate to "Writing". Scroll down until you see the XML-RPC check box under "Remote Publishing". Once this ...


2

This is really more of a server admin question than Wordpress. Error logs and php.ini file locations can vary depending on the server OS. You need to change the upload and timeout limits for php. Do that either in the main php.ini file or enable php.ini in your web directory and try: max_execution_time = 120 max_input_time = 120 memory_limit = 128M ...


2

Two things I could imagine: Check the post_modified value. Maybe import creates a definitive timestamp that you could use. You'll still have to save the import date somewhere so you can check against it. I do some post importing via a stream/HTTP response (this is not the native importer). During the import, I map my SysBot Plugin user to every post that ...


2

DomDocument is a PHP extension. It is either not installed or is disabled. You will need to install that module and/or enable it. You will need server level access to correct it. That is, you will need to be able to configure PHP. How you do that depends on what kind of server you have, so I am not sure what else to say at this point. Perhaps if you were ...


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 SHORT Export sudo mysqldump -u root -pPASSWORD DBNAME > filename.sql Import wp db import filename.sql THE LONG So this turns out to be very painless. The server dump is exactly what WP-CLI needs to import. REMOTE sudo mkdir backup Make a directory for the file. sudo chown -f -R ec2-user:group backup Set permissions to the directory ...


2

update_field() is ACF function so I would guess the issue is with it. From quick look at source it calls get_field_object() and so on, so environment might not be sufficient for it to work correctly during import. There is no "half" state for native meta data, either it exists in database or it doesn't. You could try to stick with native WP API for meta ...


1

Very simple plugin to achieve this. Runs only on activation, so, if there are 5 CSV files, the plugin must be activated/deactivated five times. File: /wp-content/plugins/create-cats-from-csv/create-cats-from-csv.php <?php /* Plugin Name: Insert CSV Categories Version: 1.0 Description: Reads a CSV file on plugin activation and insert the ...


1

You can use a load testing tool like Loadzen.com, it features a chrome plugin that will let you parameterise your form post requests so you can easily start populating your site with data while also putting the application under increasing user load (using mixed behaviour scenarios), it's a pay-as-you-go tool so you should be able to get started with the ...


1

if you use the PHP-myadmin, you should EXPORT an sql dump of ALL your tables, and then IMPORT the same sql. If I understand correctly (and maybe I am wrong) you try to import CSV into an SQL dump .. that will not work in direct sql dump. after you have the sql dump, use the following : /** UPDATE wp_options SET option_value = REPLACE(option_value, '...


1

I just found the solution. You have to go to Appearance -> Themes and click "Customize" for the theme that is currently activated and then choose the option to have a static front page and choose a page to be the blog page. After I did that, all of my custom post type posts showed up and my home page wasn't broken anymore.


1

I think all you should need to do is export from WP as you normally would if you were just transferring the content. Download the resulting XML file, change all <wp:post_type>post</wp:post_type> entries to <wp:post_type>YOUR_CUSTOM_POST_TYPE</wp:post_type>. This should work, assuming your Custom Post Type is already registered in the ...


1

I had the same problem but I was successful importing from an self produced xml (for the postmeta). <wp:postmeta> <wp:meta_key>telefono</wp:meta_key> <wp:meta_value><![CDATA[$tel_azienda]]></wp:meta_value> </wp:postmeta> The problem was that after that the data were not available to use with MF, I've solved it ...


1

Thank you so much buddy. I wish I had seen your post before! Meta_id 's must be chronological and can't be arbitrary (i.e. random). data must be inserted into wp_mf_postmetaand wp_postmeta. these records relate to post_id, meta_id and the key-value stores of the data itself such where key would be "movietitle" and value would be "Die Hard". I have ...



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