D3m055
By:
D3m055

Transferring several WordPress websites from shared hosting

September 21, 2013 4.3k views
Hi I have Issue transferring several websites from shared hosting. While transferring I used How to Set Up Multiple WordPress Sites on a Single Ubuntu VPS and How to Migrate WordPress from Shared Hosting to a Cloud Server with Zero Downtime tutorials(!). What I have to do is to transfer about 10 websites from shared hosting to digital ocean. At shared hosting I had 3 dbases: 1) arkbonline 2) arkbonline_laconsta 3) arkbonline_tree - the last base was used by most of those 10 websites, they had different prefixes. arkbonline_laconsta - had only one website laconsta.ru. With the help of How to Migrate WordPress from Shared Hosting to a Cloud Server with Zero Downtime tutorial it was pretty easy to transfer laconsta.ru website. Now it has its own database with the same name but different username. The second website used arkbonline_tree database. I've restored the sql script to a new database with a different name - let's call it tree_ocean. Created new SQL user for this new restored database. Then I set up all the virtual hosting stuff and uploaded contents of the wordpress website to digital ocean. After updating DNS the issue I face is that the website sends me to /wp-admin/install.php page. It does not display any error message. It simply thinks that it is clean installation of Wordpress. I've tried to reinstall it several times. But every time I get /wp-admin/install.php page. I didnt face this issue with the first WP website. What would you recommend me check?
11 Answers
Try logging in to the mysql database by running
mysql -h localhost -u tree_ocean_user -p tree_ocean
(enter the user's password when it prompts you for it)

Once you're in, run show tables; - do you see any tables?
Yep, with the user used in Wp configuration I see all the tables I expect.
Log in to mysql as root (mysql -h localhost -u root -p) and run show databases;

What does it output?
mysql> show databases;
+---------------------+
| Database |
+---------------------+
| information_schema |
| Activteac_Ocean |
| arkbonline_laconsta |
| diForNumberOne |
| mysql |
| performance_schema |
+---------------------+
6 rows in set (0.00 sec)

mysql>
---
Activteac_Ocean - is the issue base
Does Activteac_Ocean have wordpress's tables?
use Activteac_Ocean;

show tables;
mysql> use Activteac_Ocean;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> show tables;
+---------------------------------+
| Tables_in_Activteac_Ocean |
+---------------------------------+
| aa_commentmeta |
| aa_comments |
| aa_links |
| aa_options |
| aa_postmeta |
| aa_posts |
| aa_term_relationships |
| aa_term_taxonomy |
| aa_terms |
| aa_usermeta |
| aa_users |
| ab_commentmeta |
| ab_comments |
| ab_links |
| ab_options |
| ab_postmeta |
| ab_posts |
| ab_term_relationships |
| ab_term_taxonomy |
| ab_terms |
| ab_usermeta |
| ab_users |
| ae_commentmeta |
| ae_comments |
| ae_flag_album |
| ae_flag_comments |
| ae_flag_gallery |
| ae_flag_pictures |
| ae_links |
| ae_ngg_album |
| ae_ngg_gallery |
| ae_ngg_pictures |
| ae_options |
| ae_postmeta |
| ae_posts |
| ae_term_relationships |
| ae_term_taxonomy |
| ae_terms |
| ae_usermeta |
| ae_users |
| ag_commentmeta |
| ag_comments |
| ag_links |
| ag_options |
| ag_postmeta |
| ag_posts |
| ag_term_relationships |
| ag_term_taxonomy |
| ag_terms |
| ag_usermeta |
| ag_users |
| ai_commentmeta |
| ai_comments |
| ai_fresh_slider |
| ai_links |
| ai_options |
| ai_postmeta |
| ai_posts |
| ai_term_relationships |
| ai_term_taxonomy |
| ai_terms |
| ai_usermeta |
| ai_users |
| ak_carousel_entries_wpress |
| ak_carousel_wpress |
| ak_commentmeta |
| ak_comments |
| ak_links |
| ak_options |
| ak_postmeta |
| ak_posts |
| ak_term_relationships |
| ak_term_taxonomy |
| ak_terms |
| ak_usermeta |
| ak_users |
| am_commentmeta |
| am_comments |
| am_links |
| am_options |
| am_postmeta |
| am_posts |
| am_term_relationships |
| am_term_taxonomy |
| am_terms |
| am_usermeta |
| am_users |
| an_commentmeta |
| an_comments |
| an_links |
| an_options |
| an_postmeta |
| an_posts |
| an_term_relationships |
| an_term_taxonomy |
| an_terms |
| an_usermeta |
| an_users |
| ao_commentmeta |
| ao_comments |
| ao_links |
| ao_options |
| ao_postmeta |
| ao_posts |
| ao_term_relationships |
| ao_term_taxonomy |
| ao_terms |
| ao_usermeta |
| ao_users |
| aq_commentmeta |
| aq_comments |
| aq_links |
| aq_options |
| aq_postmeta |
| aq_posts |
| aq_term_relationships |
| aq_term_taxonomy |
| aq_terms |
| aq_usermeta |
| aq_users |
| as_bpspro_login_security |
| as_bpspro_seclog_ignore |
| as_commentmeta |
| as_comments |
| as_links |
| as_options |
| as_postmeta |
| as_posts |
| as_redirection_groups |
| as_redirection_items |
| as_redirection_logs |
| as_redirection_modules |
| as_term_relationships |
| as_term_taxonomy |
| as_terms |
| as_usermeta |
| as_users |
| as_wowslider |
| az_commentmeta |
| az_comments |
| az_dt-blog |
| az_dt-frontpages |
| az_dt-sidebars |
| az_dt-slides |
| az_dt-slideshows |
| az_links |
| az_options |
| az_postmeta |
| az_posts |
| az_term_relationships |
| az_term_taxonomy |
| az_terms |
| az_usermeta |
| az_users |
| ba_commentmeta |
| ba_comments |
| ba_links |
| ba_options |
| ba_postmeta |
| ba_posts |
| ba_term_relationships |
| ba_term_taxonomy |
| ba_terms |
| ba_usermeta |
| ba_users |
| budjk_commentmeta |
| budjk_comments |
| budjk_links |
| budjk_options |
| budjk_postmeta |
| budjk_posts |
| budjk_term_relationships |
| budjk_term_taxonomy |
| budjk_terms |
| budjk_usermeta |
| budjk_users |
| graft2840_commentmeta |
| graft2840_comments |
| graft2840_links |
| graft2840_options |
| graft2840_postmeta |
| graft2840_posts |
| graft2840_term_relationships |
| graft2840_term_taxonomy |
| graft2840_terms |
| graft2840_usermeta |
| graft2840_users |
| grgf6104_commentmeta |
| grgf6104_comments |
| grgf6104_lazyestfiles |
| grgf6104_links |
| grgf6104_options |
| grgf6104_postmeta |
| grgf6104_posts |
| grgf6104_term_relationships |
| grgf6104_term_taxonomy |
| grgf6104_terms |
| grgf6104_usermeta |
| grgf6104_users |
| grgf6104_wppa_albums |
| grgf6104_wppa_comments |
| grgf6104_wppa_exif |
| grgf6104_wppa_iptc |
| grgf6104_wppa_photos |
| grgf6104_wppa_rating |
| inprdx_carousel_entries_wpress |
| inprdx_carousel_wpress |
| inprdx_commentmeta |
| inprdx_comments |
| inprdx_ehu_data |
| inprdx_ehu_stats |
| inprdx_links |
| inprdx_options |
| inprdx_postmeta |
| inprdx_posts |
| inprdx_term_relationships |
| inprdx_term_taxonomy |
| inprdx_terms |
| inprdx_usermeta |
| inprdx_users |
| intra_commentmeta |
| intra_comments |
| intra_links |
| intra_options |
| intra_postmeta |
| intra_posts |
| intra_term_relationships |
| intra_term_taxonomy |
| intra_terms |
| intra_usermeta |
| intra_users |
| kdbra1530_commentmeta |
| kdbra1530_comments |
| kdbra1530_links |
| kdbra1530_options |
| kdbra1530_postmeta |
| kdbra1530_posts |
| kdbra1530_redirection_groups |
| kdbra1530_redirection_items |
| kdbra1530_redirection_logs |
| kdbra1530_redirection_modules |
| kdbra1530_term_relationships |
| kdbra1530_term_taxonomy |
| kdbra1530_terms |
| kdbra1530_usermeta |
| kdbra1530_users |
| mgstre_commentmeta |
| mgstre_comments |
| mgstre_links |
| mgstre_options |
| mgstre_postmeta |
| mgstre_posts |
| mgstre_term_relationships |
| mgstre_term_taxonomy |
| mgstre_terms |
| mgstre_usermeta |
| mgstre_users |
| mgstre_wpsc_also_bought |
| mgstre_wpsc_cart_contents |
| mgstre_wpsc_checkout_forms |
| mgstre_wpsc_claimed_stock |
| mgstre_wpsc_coupon_codes |
| mgstre_wpsc_currency_list |
| mgstre_wpsc_download_status |
| mgstre_wpsc_meta |
| mgstre_wpsc_product_rating |
| mgstre_wpsc_purchase_logs |
| mgstre_wpsc_region_tax |
| mgstre_wpsc_submited_form_data |
| pgktr_commentmeta |
| pgktr_comments |
| pgktr_links |
| pgktr_ngg_album |
| pgktr_ngg_gallery |
| pgktr_ngg_pictures |
| pgktr_options |
| pgktr_postmeta |
| pgktr_posts |
| pgktr_term_relationships |
| pgktr_term_taxonomy |
| pgktr_terms |
| pgktr_usermeta |
| pgktr_users |
| tpddz47614_commentmeta |
| tpddz47614_comments |
| tpddz47614_dmsguestbook |
| tpddz47614_forum_forums |
| tpddz47614_forum_groups |
| tpddz47614_forum_posts |
| tpddz47614_forum_threads |
| tpddz47614_forum_usergroup2user |
| tpddz47614_forum_usergroups |
| tpddz47614_links |
| tpddz47614_options |
| tpddz47614_postmeta |
| tpddz47614_posts |
| tpddz47614_term_relationships |
| tpddz47614_term_taxonomy |
| tpddz47614_terms |
| tpddz47614_usermeta |
| tpddz47614_users |
| wpahf6203_commentmeta |
| wpahf6203_comments |
| wpahf6203_links |
| wpahf6203_options |
| wpahf6203_postmeta |
| wpahf6203_posts |
| wpahf6203_term_relationships |
| wpahf6203_term_taxonomy |
| wpahf6203_terms |
| wpahf6203_usermeta |
| wpahf6203_users |
+---------------------------------+
312 rows in set (0.01 sec)

mysql>

As_ is the prefix I want my transferred website to catch.

Here is part of config.php:


define('DB_NAME', 'Activteac_Ocean');

/** ??? ???????????? MySQL */
define('DB_USER', 'ActivSQL');

/** ?????? ? ???? ?????? MySQL */
define('DB_PASSWORD', 'here_is_password');

/** ??? ??????? MySQL */
define('DB_HOST', 'localhost');

$table_prefix = 'aS_';
Hmm why do you have that much tables in the ActivSQL database? What commands did you run when you migrated MySQL from shared hosting to your droplet?
While this DB worked in shared hosting - there were several websites attached to this DB but with different prefixes.

This is the exact command from Terminal app log:
mysql -h localhost -u root -p Activteac_Ocean < tree4.sql

tree4.sql - is the export script of the base from shared hosting
Try setting $table_prefix to 'as_' (not 'aS_'). Does that fix it?
It worked! Thank you! I also had to update new prefix in DB as WP was saying that I had no rights to see this page, after attempt to log in.
Again, Thank You so Much!
Awesome! Glad to hear that! :]
Have another answer? Share your knowledge.