Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2014-11-05 19:00:22
- progre55
- Member
- Registered: 2006-05-02
- Posts: 668
Assistance With Import
What is Is the easiest way to import database articles from one textpattern installation to another?
I have in advanced made sure that all the custom fields appear in both databases.
Thank you in advance for your assistance.
Offline
Re: Assistance With Import
Assuming you have two TXP installs in separate datebases on a typical Linux system, here’s a quick and dirty way:
cp /var/lib/mysql/oldtxpdb/*textpattern.??? /var/lib/mysql/newtxpdb/.
Offline
Re: Assistance With Import
As far as easiest, it should be a case of a straight duplication (export then import) of the textpattern
table in your database. With that in mind, either a browser/GUI approach – phpMyAdmin, Adminer, SequelPro or similar – should be straightforward.
Offline
#4 2014-11-06 13:38:43
- progre55
- Member
- Registered: 2006-05-02
- Posts: 668
Re: Assistance With Import
I guess I should add one additional wrinkle — I need to append the one DB with the additional articles —- it is not an import of a clean install — I am combining the articles of two separate TXP installs —-
Offline
Re: Assistance With Import
You could renumber the appended article IDs so they don’t clash. Prepend a 1
to the beginning, for example – see here if you need an example.
Edit: I say example a lot.
Last edited by gaekwad (2014-11-06 18:06:49)
Offline
Re: Assistance With Import
Or export the existing table without the ID column. Most database administration clients like phpMyAdmin allow you to select which fields to export if you go into their ‘custom’ export tool. Textpattern will automatically assign new ID values to the imported rows.
Note this method won’t work if you’re merging (i.e. some of your articles in DB#1 are already in DB#2 and some therefore need to be replaced instead of appended). In either case, backup both databases first :-)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
#7 2014-11-06 16:47:30
- progre55
- Member
- Registered: 2006-05-02
- Posts: 668
Re: Assistance With Import
Thank you both.
Bloke: Can you please check your email — want to touch base with you on something else —-
progre55
Offline
Re: Assistance With Import
You can use jmd_cvs to improt article into db.
Offline
#9 2014-11-09 16:54:52
- moon blake
- Member
- From: near Hannover, Germany
- Registered: 2009-07-16
- Posts: 76
Re: Assistance With Import
Is jmd_cvs still working? According to his github repository it is “old and unsupported”, last contribution is from six years ago.
Offline
Re: Assistance With Import
Hi
I still use it, i only make a little modification to import the html part of articles, but since textpattern table hadent changed it still work.
But allways make a backup before doing any import stuff, soetimes things goes wrong.
Cheers
Offline
#11 2014-11-10 22:21:37
- progre55
- Member
- Registered: 2006-05-02
- Posts: 668
Re: Assistance With Import
Dragondz— thanks for the input. My concern is the “little” modification your making —- I also quickly read that — jmd_cvs — it is somewhat unforgiving with special characters etc. — I think I am going to first try Blokes suggestion first and see how it works —
Offline
Re: Assistance With Import
Hi
My modification are only here to perform an html import that s not taken in the original plugin, but it works without it, for the special caracters you have to ensure that your cvs file is exported usinf utf-8 encoding and it works.
Cheers.
Offline