Importing Content

From Habari Project

Jump to: navigation, search

Habari currently ships with a plugin to import posts, comments, tags (including Ultimate Tag Warrior Tags) and users from WordPress (current version confirmed to work with 2.7.1, mileage will vary with older versions). Other importers for Serendipity 0.9, Blogger, Drupal, and Movable Type in Habari's plugin directory. There is also an importer for Habari, which lets people import content from one Habari installation to another, such as for changing database backends.

You must first activate the plugin for the platform from which you are importing. Go to the Plugins page, click Activate by the importer you wish to use. After activating an importer plugin, it will be added to the list of other blog tools from which you can import on the import page. Then go to the Import page.

Important Note: Deactivate any spamchecking plugins or plugins that contact outside sites before beginning to import your data. If active, these will greatly slow down, or even prevent, the successful completion of the import process. In the case of spamchecking plugins, comments may incorrectly be marked as unapproved if a spamchecker plugin is active. Also be sure to not have any pingback plugins, or plugins like Twitter that send new posts as "tweets".

After you have completed the import process, remember to reactivate the plugins you deactivated.

Importing A Wordpress Database

After choosing to import a Wordpress database, you will be prompted to fill in your WordPress database information, and choose your options for tag importation.

It is suggested you set up a separate database for your Habari install from that of your WordPress installation. The import process will be much faster and has less room for error. WordPress pages should import as Habari pages, and everything else either an entry or draft.

Approved and unapproved comments will also be imported.

Note that WordPress permalinks and paths will be lost, and you should explore options with .htaccess if you are concerned with maintaining your previous links. Route 301 plugin may help in some cases, as will Raman Ng's RN Custom Permalink plugin. Alternatively, you can set up a custom permalink scheme by adding a rewrite rule to your Habari database. Feel free to post to Habari users if you have any questions or problems with your migration.

It is also recommended to minimize the amount of tables that are not part of the default WordPress schema. If you encounter any issues with your import, try backing up the WordPress database, and dropping or emptying any tables that are not part of the core WP tables.

Restoring a WordPress sql file

If you have a SQL file that you've exported from your original WP database, then converting it to Habari is reasonably simple.

You need to restore that SQL backup file to your MySQL database so that Habari can read the data from it.

You have two options for restoring your database. You can use phpMyAdmin via the web to restore the data, or you can use the command line on your server.

To use phpMyAdmin, you must have phpMyAdmin already installed on your server. It is possible to do this yourself if it's not already done, although many hosts already have this installed. Note that installing phpMyAdmin is more complicated than installing Habari, and is outside the scope of what I will describe here.

Assuming you have phpMyAdmin running, you should either create a new database on your server or connect to the existing Habari database. It is going to be a better option to create a new database since you will not need the data from that datbase after you have imported it into Habari's own database. If you import directly into Habari's database, you will have to delete the old WordPress tables individually if you do not want them, which requires a few extra steps that deleting a whole database does not. Either way is pretty trivial.

Whatever database you choose, click the Import option for that database, then choose the SQL file to upload. Submit the form to restore your WordPress backup to that database.

If you're doing this from the command line (via SSH, via Putty), upload the sql file to your server where you can access it. Execute the following command:

mysql -u{username} -p {database} < {sqlfile}

Substitute the username, the database name, and sql filename where needed, and supply the correct password when requested.

When your WordPress database is ultimately restored, you can proceed with the import into Habari.

When the import is complete, you can delete the WordPress database (if you restored the backup to its own database) or the WordPress tables from your Habari database.

reprinted from a post by ringmaster on habari-dev

Importing A Serendipity Database

After choosing to import a Serendipity database, you will be prompted to enter the version of Serendipity you are using, OR the location of the root web directory where the Serendipity configuration file can be found to gather version information. After entering this, you will be prompted for your database connection details, whether or not to import your Serendipity categories as tags, and whether or not to import unapproved comments. Enter these details, then click the Process with Import button to proceed.

As with Wordpress, your permalinks and paths will be lost. Explore the same options discussed above to maintain your previous links.

Personal tools
This is a cached copy of the requested page, and may not be up to date.

Sorry! This site is experiencing technical difficulties.
Try waiting a few minutes and reloading.

(Cannot contact the database server: Access denied for user 'habari'@'localhost' to database 'habari_wiki' (localhost))

You can try searching via Google in the meantime.
Note that their indexes of our content may be out of date.