< Back to Importing

Generic MySQL Imports

To import to WSN from any mysql table you can use one of these processes:

Via CSV, For Topics or Forums

1) Using phpmyadmin (which is under your web hosting control panel in the mysql section), navigate to the database table you want to import.
2) Use the export tab to export the data as a CSV file. Set it to terminate fields with , (a comma) instead of the default ; (semicolon).
3) In WSN, go to Admin -> Topics -> Add Topics -> "CSV/TSV Import", upload your CSV file, and select what each field means. Run the import. If you get an out of memory or timeout error, you'll need to either increase the memory and time limits in php.ini or split the CSV file into several smaller files before uploading.
4) In WSN, go to Admin Panel -> Maintenance -> Regenerate Counters and select to regenerate everything.

Direct, For Any Table Type

1) Using phpmyadmin, alter the names of each field of your old data table to match the equivilant WSN field names. Set all fields to NOT NULL as well.
2) Remove any extraneous left-over fields.
3) Export the data from this with complete inserts.
4) Import this data to your WSN table.
5) If this is the topics table, run the following queries to set appropriate values to fields to make the topics all visible and give them a submission time if you can't convert your source data's times to unix timestamps. Be sure to replace wsn_ with the table prefix you're using for this installation!
UPDATE wsn_links SET validated=1;
UPDATE wsn_links SET type='regular';
UPDATE wsn_links SET validatedemail=1;
UPDATE wsn_links SET active=1;
UPDATE wsn_links SET timevalidated=UNIX_TIMESTAMP();
UPDATE wsn_links SET time=UNIX_TIMESTAMP();
6) If this is the topics table and your source data didn't have a forum id value or you haven't created WSN forums with those ids, then you can use this query to put all the topics into forum #1: UPDATE wsn_links SET catid=1;
7) In WSN, g
o to Admin Panel -> Maintenance -> Regenerate Counters and select to regenerate everything.

If you can't import your database, you can hire database import service at the standard WSN services rate (see the site's services section).