Rectangle 27 0

I will suggest you to use export option in wordpress to get data from your current site and then use import option to get data in the new site that you want.Its simple no coding needed at all.

php - Get ALL Products from WooCommerce store - Stack Overflow

php wordpress woocommerce wp-query
Rectangle 27 0

This guide should assist you. Refer to the WordPress section. Once you set up your new droplet you should be able to import this data directly from the admin interface of your new site.

WordPress itlearnses
Rectangle 27 0

Go  Wp-admin->tool->import->wordpress on click

    -> install importer plugin then import your xml.

php - How can I import the sample xml data into my Wordpress site? - S...

php xml wordpress wordpress-theming
Rectangle 27 0

For all imports you can use Wordpress wp_insert_post() function. You should create basic template for this work. Read data files with lines. And foreach it. While foreaching, define title, content or other fields.

But wouldn't I have to use something that inserts products, not posts? Or are products at the root still posts? Like I'd want to define fields for price, etc.

Could you convert your csv to array with php?

How do I import flipkart products from a csv into Wordpress/WooCommerc...

wordpress csv import woocommerce flipkart
Rectangle 27 0

Yes the defacto standard in Australia in the REAXML feed. When trying to import the data into your application or importing system like WP All import you need to parse the files into a single file for import. This was a huge pain several years ago and I created a simple REAXML parser that could be imported into WordPress. My script works outside of WordPress so you could use it with other applications if needed. Some details are here about the way it works

properties - XML Standard for Real Estate property - Stack Overflow

xml properties standards
Rectangle 27 0

Use Wordpress Importer plugin then export your data, delete database and file, after re-install WP in the language you want, and re-use the same plugin to import data on the new installation... I made this, it works great!

Second installation of Wordpress without a new database, with the firs...

Rectangle 27 0

See Moving WordPress WordPress Codex for the standardized ways to export and import the database and reset base URLs without impacting the serialized data that can be present in theme and plugin options.

Transferring a Wordpress website from mamp - Stack Overflow

wordpress wordpress-plugin mamp
Rectangle 27 0

Ok I am going to answer my question with some advice. It's clear that some of my images were 'hard coded' as devin mentioned as I could not find a logical reason for some not showing (even when I looked at the tabular data in MySQL) and because I'm not a database engineer / developer - I wasn't prepared to dive too deep into that with the possibility of causing further issues... so I decided to take down the entire wordpress site, create a new database, re-install wordpress and I imported an exported xml file that I created and saved (luckily) before 'migrating sites'.

1) Whether you migrate a wordpress site or not, always backup your website regularly by creating an export of your wordpress structure. It may save you a lot of work in future.

2) If you're an amateur or beginner at development and MYSQL like myself, I'd suggest you create your wordpress site on the actual domain name you want it on. This will save you from 'migration' headaches as I've just experienced ... and a lot of time. Learn from my mistakes. Although there is probably a solution to my question above, it's out of my expertise / knowledge and could be out of yours too... so make it easy for yourself :)

mysql - Some images won't show when moved Wordpress site to another do...

mysql html wordpress
Rectangle 27 0

I found a solution to import multiple categories. I used the WordPress export and exported all the information from my site (posts, categories, ect). Then I carefully looked through the xml file and found the type of data I wanted to import (which was categories). So once I found the categories and its format, I removed everything else in between the ... tags, after the file details (titles, link, description, pubDate, generator, ect).

The category format is:

<wp:category><wp:category_nicename>"This is the Slug name" (no quotes</wp:category_nicename><wp:category_parent>"This is the parent name, optional" (no quotes)</wp:category_parent><wp:cat_name><![CDATA["This is the Category name" (no quotes)]]></wp:cat_name></wp:category>

You would create as many of this example as you need and just change the required information for the import. I think this strategy can also be used for other data to import. You would just have to examine the structure of the data in the original xml exported file and basically copy what you see.

Im still open to other techniques to import data. I hope this helps someone with importing needs.

import - WordPress: Importing multiple categories? - Stack Overflow

wordpress import
Rectangle 27 0

Nice question. Since Joomla is answered I will answer for WordPress. I would suggest creating a php file that exports all your table data to xml (RSS or WordPress). Then you can simply import your info into WordPress using WordPress import function.

This way you can keep both the tables and you can fully import info into WordPress.

If your interested I could probably cook some code together if you give me the format of your tables.

Easy ways to convert a MYSQL-connected dynamic PHP site into a CMS? - ...

php mysql wordpress joomla content-management-system
Rectangle 27 0

Update: This function is meant to deal with XML data and is limited to ACF up to version 4. ACF 5 exports its fields as JSON data.

The solution turned into a Wordpress plugin.

function insert_acf_field( $xml_string, $allow_duplicates = false ) {

// Parse ACF post's XML
$content = simplexml_load_string( $xml_string, 'SimpleXMLElement', LIBXML_NOCDATA); 

// Parse XML post attributes containing fields
$wp_post_attributes = $content->channel->item->children('wp', true);

# Copy basic properties from the exported field
$wp_post_data = array(
    'post_type'   => 'acf',
    'post_title'  => $content->channel->item->title,
    'post_name'   => $wp_post_attributes->post_name,
    'post_status' => 'publish',
    'post_author' => 1


$the_post = get_page_by_title($content->channel->item->title, 'OBJECT', 'acf');

# Execute only if doesn't exist already
if ( !$the_post || $allow_duplicates == true ) {
    $post_id = wp_insert_post( $wp_post_data );
else {
    $post_id = $the_post->ID;

$wp_post_meta = $content->channel->item->children('wp', true);

if( $wp_post_meta ) {
    foreach ( $wp_post_meta as $row) {

        // Choose only arrays (postmeta)
        if( count($row) > 0) {
            // using addlashes on meta values to compensate for stripslashes() that will be run upon import
            update_post_meta( $post_id, $row->meta_key, addslashes( $row->meta_value ) );


Function expects at least $xml_string parameter to be passed. It should contain the contents of the XML file that is produced by ACF plugin upon export of an ACF field (post of acf type).

The function will try to create one new ACF post unless one already exists, and then populate it with fields. To insert more than one field (a clone) with the same title, you should pass true as a second parameter.

There are a few issues still to be addressed, but the function in its current state should be usable

How import XML data into Wordpress programatically? - Stack Overflow

xml wordpress
Rectangle 27 0

If you're nervous about importing the old data directly into the WordPress database, you can use CSV as an intermediary format. There are many plugins built for this. Here's one that looks like it's in active development:

I'd go the CSV path too.

php - Can we import posts directly into Wordpress database? - Stack Ov...

php xml wordpress import rss
Rectangle 27 0

During migration from one server to another one you can dumb(export) and import mysql database of your website to your new server's DB. Then you must manually edit some rows('site_url' and 'home' option_names) in wp_options table. Then you must copy and paste entire files and folders to new server. Then to edit wp-config.php file. That's all. You Wordpress website will continue from point where stopped in old server. No any data lose or settings change. I usually use this way and i am very satisfied.

Wordpress theme loses widgets during move - Stack Overflow

wordpress wordpress-theming wordpress-widget
Rectangle 27 0

It is better to take advantage of the WordPress Codex rather than importing directly into the tables. This will ensure that the IDs/relationships are generated correctly and that data is serialized as needed to the various tables. If you don't want to write custom code, the easiest way to do this would be to use a CSV import plugin - there are several in the WordPress Plugin Repository - but no particular recommendations.

What do you exactly mean when you say to me that its better using the Codex than import it directly into tables? The posts on the old blog have no comments and I think that the only relation is between post and user

@AndreaNobili - Inserting into the tables directly is certainly possible, but if you are new to WordPress and aren't familiar with all of the tables/columns and how they relate to each other it's easier to use a plugin that has already accounted for it. Not everything is directly imported for example, some meta data fields will be serialized, etc.

what do you mean that some metadata fields are serialized?

php - How to migrate the posts from an old custom legacy blog to a new...

php mysql wordpress content-management-system migration
Rectangle 27 0

A custom import is going to take a custom solution. Your best bet is to take a wordpress generated xml document and make an excel template out of it, then import the data that way. Here is a link to get you started, or at least give you the idea. There are plenty of other ways to do this, here is another way you could try.

Custom Wordpress XML import to Post - Stack Overflow

xml wordpress wordpress-plugin
Rectangle 27 0

A custom import is going to take a custom solution. Your best bet is to take a wordpress generated xml document and make an excel template out of it, then import the data that way. Here is a link to get you started, or at least give you the idea. There are plenty of other ways to do this, here is another way you could try.

Custom Wordpress XML import to Post - Stack Overflow

xml wordpress wordpress-plugin
Rectangle 27 0

include_once(ABSPATH . WPINC . '/feed.php');
$feed = fetch_feed( );
$rss = $feed;
$maxitems = $rss->get_item_quantity(4);
$rss_items = $rss->get_items(0, $maxitems);
<?php if ($maxitems == 0) echo 'No news';
foreach ( $rss_items as $item ) : ?>

 // display item title and date  

        echo '<span class="comment_author"><a href="" target="_blank">' . substr($item->get_title(), 0, 65) . '...</a></span><br>'; ?>
        // if single item, display content

            echo ' <span class="latest_content"><a href="" target="_blank">'. substr($item->get_content(), 0, 30).'</a></span>';

        echo '<span class="latest_content">' . shorten($item->get_description(), 150).'</span><br>';


<?php endforeach; ?>
$feed = fetch_feed( );

Here i imported the feed from the site that you want. Look in sidebar for External Feed.

The only thing that you have to do is set href adress!

How to import Affiliate Window data feeds XML in wordpress - Stack Ove...

xml wordpress dataimporthandler