Title: WordPress Adminpanel not connected to database
Last modified: February 22, 2021

---

# WordPress Adminpanel not connected to database

 *  Resolved [reachingout](https://wordpress.org/support/users/reachingout/)
 * (@reachingout)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/wordpress-adminpanel-not-connected-to-database/)
 * Hi,
 * So I created a staging website, that is, a copy of mywebsite.com to a subdomain
   sta.mywebsite.com.
 * I did this copy via WordPress’ Softaculous ”Create Staging”. A copy of my public_html
   folder and phpMyAdmin database were created. But after that, I could not access
   sta.mywebsite.com due to Error establish database connection. I could not figure
   out what was wrong, so I decided to reinstall WordPress and to only keep my wp-
   content folder in sta_public_html. I therefore downloaded the latest WordPress.
   So, through FTP, I replaced everything in my staged sta_public_html folder but
   the wp-content folder, which I kept. I then installed WordPress throught the 
   wizard that shows up automatically when accessing site for the first time, and
   got throught to my WordPress Adminpanel for sta.mywebsite.com. But all content,
   like the Pages and menu is gone. The new WordPress installation does not read
   my newly copied database (my staging database), where everything is stored. Also,
   even if I change the password in the new database table wp_users, I can still
   log in to WordPress Adminpanel for sta.mywebsite.com with the password I created
   with the WordPress wizard. Funny thing, if I change that WordPress Adminpanel
   password in my old, original, database I can still log in with the password that
   was created during the wizard setup. So I do not know what database the new wordpress
   is reading, nor where the Adminpanel password is stored
 * The question is, how can I make my new WordPress installation to read my new 
   copied database? I have not hit the limit of the number of databases I can have.
    -  This topic was modified 5 years, 4 months ago by [reachingout](https://wordpress.org/support/users/reachingout/).

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [corrinarusso](https://wordpress.org/support/users/corrinarusso/)
 * (@corrinarusso)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/wordpress-adminpanel-not-connected-to-database/#post-14087063)
 * Try this first :
    [https://en-ca.wordpress.org/plugins/all-in-one-wp-migration/](https://en-ca.wordpress.org/plugins/all-in-one-wp-migration/)
 * – install All In On Migration on production
    – export to a file – install WordPress
   from Control Panel on a new subdomain – install All In On Migration on this subdomain–
   import the file you downloaded from production
 *  Thread Starter [reachingout](https://wordpress.org/support/users/reachingout/)
 * (@reachingout)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/wordpress-adminpanel-not-connected-to-database/#post-14087082)
 * OK, I solved it! It was the table prefix, $table_prefix, in the wp-config.php
   file that needed to be changed. Thanks anyway 🙂
    -  This reply was modified 5 years, 4 months ago by [reachingout](https://wordpress.org/support/users/reachingout/).
    -  This reply was modified 5 years, 4 months ago by [reachingout](https://wordpress.org/support/users/reachingout/).
 *  [corrinarusso](https://wordpress.org/support/users/corrinarusso/)
 * (@corrinarusso)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/wordpress-adminpanel-not-connected-to-database/#post-14087138)
 * Lol.
    Makes sense.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘WordPress Adminpanel not connected to database’ is closed to new replies.

## Tags

 * [staging](https://wordpress.org/support/topic-tag/staging/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 2 participants
 * Last reply from: [corrinarusso](https://wordpress.org/support/users/corrinarusso/)
 * Last activity: [5 years, 4 months ago](https://wordpress.org/support/topic/wordpress-adminpanel-not-connected-to-database/#post-14087138)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
