Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-10-17 13:24:09

jpdupont
Member
Registered: 2004-10-01
Posts: 752

New TXP sites : same actions, again and again ...

Hello,
Each time I setup a new TXP site, I must :
- FTP/setup the DB/install/ the TXP core : OK.
Then, again and again :
- Clean all the “standard” stuff : articles, comments, pages, forms, css, categories, images . (BTW impossible to delete some forms – no check boxes – why ?)
- Install the 10 same usual plugins, again, and again …
- Modify the stettings (always in the same way : remove comments, …)

Question : is it an easy (and secure) way :
- To reset/empty TXP
- To install qwickly the usual plugins
- …

Offline

#2 2008-10-17 13:32:35

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,453
Website GitHub

Re: New TXP sites : same actions, again and again ...

jpdupont wrote:

(BTW impossible to delete some forms – no check boxes – why ?)

They are required by the system as ‘default’ forms; one for each content type.

To reset/empty TXP / To install qwickly the usual plugins

Afaik, the installation wizard just takes care of generating config.php and inserting users, so if you wanted to “automate” that you could simply keep a local copy of a base TXP insallation without the setup dir and other stuff you don’t want, copy and paste a config.php from an old system into the textpattern directory, edit it to reflect your new MySQL database credentials and FTP the lot to your new location.

To go with that, you would also set up a running TXP system how you like it with settings, languages, forms, layout, plugins, users, etc and then do a MySQL backup (or use the excellent rss_admin_db_manager plugin). When you have set up your next system (as above) there’s nothing to stop you restoring this backup into the new database via phpMyAdmin.

None of that is tested (you might have to change a few things like name of site, file locations and stuff) so I’d wait for official confirmation from some gurus, but something like that should work.

In theory.

Last edited by Bloke (2008-10-17 13:35:19)


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

#3 2008-10-17 14:40:36

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: New TXP sites : same actions, again and again ...

I take it that what you require is a simple way to get back to a basic install but with all your regular plug-ins included and those forms/page templates removed that you don’t require. If that is correct then when you create a new set-up, delete all the forms/page templates you don’t want and install all your regular plug-ins then simply do a database backup and save it to your computer. If you included Rob’s rss_admin_db_manger as one of your plug-ins you could do the backup from inside TXP Admin but if you prefer you can do it from your cPanel. Then get on with your site development.

When you need to return to the basic set-up simply go to your cPanel, go into MySQL admin, find the database, “drop” all the tables (don’t delete the database) then import the database you saved to your computer. You should now have your basic set-up back including all your plug-ins and minus all the forms/page templates you removed.

The above assumes that you are re-setting an existing site, maybe a site you use specifically for developing. If you want to set up a brand new site then install TXP in the normal manner then go to MySQL admin in your cPanel, find the new database, “drop” all the tables (don’t delete the database) and import the database you saved to your computer. You must remember that your site login will be changed to whatever is included in the saved database as will some Preference sttings such as “Site URL”, “File directory path” and “Temporary directory path” which will all need modifying before the site will work properly.

The reason some of the page templates and forms can’t be deleted is a “safety” feature.

Last edited by thebombsite (2008-10-17 14:46:07)


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#4 2008-10-17 14:44:54

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: New TXP sites : same actions, again and again ...

Bloke wrote:

None of that is tested (you might have to change a few things like name of site, file locations and stuff) so I’d wait for official confirmation from some gurus, but something like that should work.

Confirmed, yep, it works. You just need SQL db dumb of the your desired and configured Textpattern install and copy of the Textpattern core aka files with out setup dir.

Then everytime you need new install, just import the dumb to a new db. Only things you need to change is path, url, db and possibly db credentials from the db/SQL file (that is only a small sql (text) file). That way, you always have a same kind of base install.

That all can be done in two-ten seconds depending how fast your server and up speed is.

Last edited by Gocom (2008-10-17 14:46:36)

Offline

#5 2008-10-17 14:45:59

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: New TXP sites : same actions, again and again ...

jpdupont> Set up a milli-vanilli install with all your preferred plugins and use rsync to beam it up to the new location scotty.

That’s what I do.

Offline

#6 2008-10-17 14:57:02

jpdupont
Member
Registered: 2004-10-01
Posts: 752

Re: New TXP sites : same actions, again and again ...

Stef and Stuart, thanks for your qwick answer.
As I’m just setting a new site, I’ll try this.
I use two hosting compagny (Infomaniak.ch -> here admin_db_manager don’t work, and Dreamhost.com).
No problem to export from one hosting to an other hosting, with phpMyAdmin ? Or should I try an other export/import script ?

Offline

#7 2008-10-17 15:30:44

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: New TXP sites : same actions, again and again ...

You shouldn’t need an export/import script as you are simply transferring database tables and their contents so just download the database to your computer then import to the new site. As long as both hosts use the same type of database ie. MySQL (which is the most common I think) you should be fine.


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#8 2008-10-17 16:23:41

jpdupont
Member
Registered: 2004-10-01
Posts: 752

Re: New TXP sites : same actions, again and again ...

Stuart,

I don’t have accès to the directory structure (mysql data folder). I mus use a sql script to export/import tables.

Offline

#9 2008-10-17 16:44:14

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,410

Re: New TXP sites : same actions, again and again ...

jpdupont wrote:

I don’t have accès to the directory structure (mysql data folder). I mus use a sql script to export/import tables.

Maybe I missed something but you can easily export/import a whole db or only some tables with phpmyadmin (no need for scripts).
Just look at the upper tabs for “export” , choose the tables you want from the multi-select and you’re done.

Offline

#10 2008-10-17 16:58:59

jpdupont
Member
Registered: 2004-10-01
Posts: 752

Re: New TXP sites : same actions, again and again ...

redbot a écrit:

jpdupont wrote:

I don’t have accès to the directory structure (mysql data folder). I mus use a sql script to export/import tables.

Maybe I missed something but you can easily export/import a whole db or only some tables with phpmyadmin.

>> Yes, it’s what I mean when I say import/export script.

Offline

#11 2008-10-17 17:09:57

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,410

Re: New TXP sites : same actions, again and again ...

jpdupont wrote:

Yes, it’s what I mean when I say import/export script.

Yep! I was trying to say you can do it without the need to hand-type the script but simply throught the phpmyadmin interface ;)

Offline

#12 2008-10-18 00:29:31

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: New TXP sites : same actions, again and again ...

Ahh. now I see what you mean by “export”. Misunderstood you the first time.


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

Board footer

Powered by FluxBB