As we got quite some questions dealing with migrating other CMS or custom databases to WordPress, we need a guide on how to attach the minimum needed data. Those posts have some views, but there are simply too many different systems out there to have an expert for everything. So if you want to keep your question open, follow this guide closely and improve your question.
- Connect/ssh into your server (on the command line)
Connect to your (mysql) database:
# Scheme: mysql -u {username} -p{password} # Example: user: root password: root mysql -u root -proot
Inspect the databases (
mysql>
just is the prefix of the command prompt)mysql> show databases +--------------------+ | Database | +--------------------+ | information_schema | | wordpress | | mysql | | performance_schema | +--------------------+
Select your database
mysql> use wordpress # or: your custom database mysql> use custom_database
Show existing tables
mysql> show tables; +---------------------------+ | Tables_in_custom_database | +---------------------------+ | custom_table | +---------------------------+ 1 row in set (0.00 sec)
Show table structure (this must be mapped to WordPress)
mysql> describe custom_table; +----------+--------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +----------+--------------+------+-----+---------+----------------+ | id | int(11) | NO | PRI | NULL | auto_increment | | name | varchar(255) | YES | | NULL | | | code | varchar(255) | NO | | NULL | | | city | varchar(255) | YES | | NULL | | | country | varchar(255) | YES | | NULL | | | timezone | varchar(255) | YES | | NULL | | | location | point | YES | | NULL | | | updated | longtext | YES | | NULL | | +----------+--------------+------+-----+---------+----------------+ 8 rows in set (0.09 sec)
Show example contents of that table row(s)
mysql> select * from custom_table limit 0,1; +-------+------+------+---------+------+---------------+----------+------------------------------------------------------------------------------------------------+ | id | code | city | country | name | timezone | location | updated | +-------+------+------+---------+------+---------------+----------+------------------------------------------------------------------------------------------------+ | 96073 | AUT | Wien | Austria | Wien | Vienna/Europe | Vienna | a:1:{i:0;O:12:"DateTimeZone":2{s:13:"timezone_type";i:3;s:8:"timezone";s:13:"Europe/Vienna";}} | +-------+------+------+---------+------+---------------+----------+------------------------------------------------------------------------------------------------+ 1 row in set (0.00 sec)
Then Go and add all that output to your question.
Table list, table description and an example row is the minimum needed to understand what you want to migrate and why. The mark up from the command line is easy to read and easy to copy/paste (Hint: Windows users need to highlight and hit Enter to copy stdout output).
Answers to this question should please show either alternate ways or improve upon what is shown in this question already.