Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2008-05-08 21:08:13
- ultramega
- Member
- Registered: 2006-02-26
- Posts: 221
Duplicating site - using one db only
I currently have only one database for some site I’m running. Now I’d like to duplicate existing site from current subfolder to new subfolder, to make a new, facelifted version. The old one should stay as it is for future reference, so I can’t just delete it.
If I’d have multiple db’s there wouldn’t propably be any problems. But how in earth I can import the content from old to new, when they are sharing same database? Should I install new txp with table prefix and then do what?
Offline
Re: Duplicating site - using one db only
You can just install newly txp and then replace mysql tables content with tables from old install. Bet aware from txp_prefs table where paths are stored
P.S. It’s just one of ways :)
Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?
Offline
Re: Duplicating site - using one db only
Back up your db
- Then use
RENAME TABLE textpttern TO ext_textpattern
. (will rename table textpattern with the ‘ext_’ extension.) - repeat the command for each table
- upload your back up back to the db
- In your new ‘install’ remember to change the config file (paths and prefix) as well as your paths in the admin tab.
- Have a stiff drink and keep your fingers crossed.
Last edited by colak (2008-05-09 06:45:30)
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
#4 2008-05-09 07:21:52
- ultramega
- Member
- Registered: 2006-02-26
- Posts: 221
Re: Duplicating site - using one db only
Hmm… One point more, I have to keep the old site live when building this new one. So Victor’s advice fits better in this situation, right?
Offline
Re: Duplicating site - using one db only
I take it that the content of the ‘new’ and ‘old’ sites will be the same right?
I’m not sure how victor’s method would work as the table will be replaced replaced when imported.
Another method- if you have phpMyadmin installed locally
- export your db
- import it locally
- rename (see above)
- import in your ‘live’ db.
This way, your tables will have different names and your import will not replace your existing content.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
#6 2008-05-09 08:26:12
- ultramega
- Member
- Registered: 2006-02-26
- Posts: 221
Re: Duplicating site - using one db only
Yes the content should be same. Maybe this is the best solution. So can I do this by duplicating subfolder containing txp on the server, and then making it’s config file to see these renamed, imported (prefix_) tables? Of course I have to fix paths in new preferences table too.
Offline
#7 2008-05-09 08:30:04
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,306
Re: Duplicating site - using one db only
Why not do all this locally and then reimport in one swap?
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
#8 2008-05-09 11:14:24
- ultramega
- Member
- Registered: 2006-02-26
- Posts: 221
Re: Duplicating site - using one db only
Hmm… yes. Why not :)
Offline
Pages: 1