Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
trying to take an existing site local(prefix question)
let’s say i have a live site and the database has no prefix. i want to bring it to a local database, but i want to add a prefix to all the tables in my sql file. at the moment this local database already has un-prefixed textpattern tables and therefore you can’t just import the live database cause it says there’s duplicates.
Offline
#2 2009-02-09 06:50:45
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: trying to take an existing site local(prefix question)
You can either:
- Duplicate the database, rename the tables, then dump the duplicate.
- Dump the database and do a search and replace inside the SQL file before importing it.
Offline
Re: trying to take an existing site local(prefix question)
ok that’s what i thought. i read this article on renaming wordpress, is there anything similar for textpattern where you have to rename various other things? (step 4 and 5)
Offline
Re: trying to take an existing site local(prefix question)
mrtunes wrote:
ok that’s what i thought. i read this article on renaming wordpress, is there anything similar for textpattern where you have to rename various other things?
None, of course. What an imputation…
Offline
#5 2009-02-10 02:48:08
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: trying to take an existing site local(prefix question)
LOL *pictures Robert with his nose in the air*
The only other thing you have to worry about it making sure the config.php file has the correct setting for the prefix, so it can find the tables.
Offline
Re: trying to take an existing site local(prefix question)
thank you guys. this was funny :)
Offline
Re: trying to take an existing site local(prefix question)
just thinking this one over – it seems like it doesn’t hurt to add a prefix to almost every site you work on if you plan on moving it around later. if you don’t add the prefix off the bat, you will be stuck renaming it later on.
Offline
#8 2009-02-11 23:01:47
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: trying to take an existing site local(prefix question)
Why wouldn’t you just create different databases for different installs locally?
Offline
Re: trying to take an existing site local(prefix question)
Els wrote:
Why wouldn’t you just create different databases for different installs locally?
because the destination server is the place where i have to ask the gatekeeper everytime i want to make a new database.
so i guess if i make it with a prefix locally, it’s much easier to work with their process since the last time i had to explain to him that i wanted a fresh database – he expected me to join on to someone else’s wordpress database that was also working on this project.
Offline
#10 2009-02-14 20:49:32
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: trying to take an existing site local(prefix question)
LOL, never heard that one before :)
Offline
Re: trying to take an existing site local(prefix question)
Els wrote:
LOL, never heard that one before :)
i read someone else on this forum says they have a hosting plan that says only 1 database in the contract.
but regardless i think it could also be beneficial for backups and mysql logins – everything gets reduced to one step. on the other hand when something goes wrong in the database you now have a host of tables to check over.
Offline
#12 2009-02-15 03:43:36
- urdoll
- New Member
- Registered: 2009-02-15
- Posts: 1
Re: trying to take an existing site local(prefix question)
Dump the database and replace the sql with a txt editor.
[url=http://urdoll.com/]Custom Bobbleheads[/url]
Offline