Subdomain -new site set up


#1

-i have a site abc.com which is hosted somewhere.I added as a ‘fully hosted’ domain here at dreamhost and installed one click wordpress to it.
-I created a mirror abc.dreamhosters.com for the site abc.com
-When i clicked on ‘visit’ link under manage domains against abc.dreamhosters.com,it took me to install.php.So i followed the steps to install the wordpress.
-Under Manage MySQL,it shows only 1 db.does that mean the mirrored site abc.dreamhosters.com is using the same db created for abc.com during 1 click install?
-I have noticed that 1 click install creates a table with suffix such as wp_suffixName as suppose to regular wp_
-When i will restore the DB from old host,all those tables are wp_.What do i do?Do i drop all table wp_suffixName and let the restore DB create wp_ tables?Or is there a way i can edit the table name back to wp_ from wp_suffix Name?
[hr]
Also,is there way to edit the DB name,which 1 click installs create? and what if i want to change the DB password.Do i edit the wp-config.php or there is another way?


#2

Yes a mirror site uses the same db.

You can manually create tge database instead of letting the installer do it for you.

The one click installer does create a random db prefix to make your sites harder to hack. Just edit wp-config if you import other tables that don’t have the random prefix.

In short, almost everything you’ve asked can be changed with an edit to wp-config.

To change the db password you have to change the actual db password from the dreamhost panel, but you will also need to edit the password in wp-config to match what you set in the panel.


#3

Thank you LakeRat
I like that prefix makes it less hackable.So now i have question
-How do you tell the import to NOT create new wp_tables.instead import it to wp_prefix_ tables already there?
-Currently i have two set of tables sitting for one of my website.all imported data are in wp_ tables and then i have empty wp_prefixed table which was created during 1 click install.How do i MOVE the data from wp_ tables to wp_prefixed table?


#4

Search and Replace with a text editor.


#5

Are you saying, open the backup .sql file and replace the instances of wp_ with wp_tableprefix before i restore it?


#6

If you need to make things match, yep! Then just import with phpMyAdmin :slight_smile:

While you’re doing the s&r, do a quick search around for things like hard-coded paths (/username/path/blah/ type stuff) and alter those if necessary while you’re at it. One WP I switched domains for last week had about 3 strings that needed altering… maybe 5… although it was a fully propagated ecommerce site with very few plugins, so it might be different with your sites. Whether it’s 2 or 10 things it’ll still only take you a minute to accomplish.

There are simple plugins for this type of thing, but manual search and replace is simple, fast and safe.


#7

what if i just do the SQL move of the table like
INSERT wp_prefect SELECT * FROM wp_
Will that work?I am afraid to mess up with SQL file.In the end,i will change the wp-config to point to the new wp_prefrx table?Will that work?