Title: Config error
Last modified: November 2, 2017

---

# Config error

 *  Resolved [222](https://wordpress.org/support/users/222-1/)
 * (@222-1)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/config-error-3/)
 * Hi,
    I thought I’d fixed the problem, but I hadn’t. The staging site just keep
   creating with an error in the config, and then it installs a new version of WordPress.
   I checked all the plugins and the only one that had a potential issue seems to
   be Bad Behavior, so I deactivated it. Created a new staging site and it was successful
   but with this error: [ERROR]-[2017/11/02 13:15:02] Search & Replace: Failed to
   update table_prefix in /home/dh_g962qn/samanthamclark.com/stage/wp-config.php.
   Can’t read contents Then when I go to the staging site, it tells me to setup 
   the config. I can’t figure out what’s going wrong. Thank you for your help.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fconfig-error-3%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [Rene Hermenau](https://wordpress.org/support/users/renehermi/)
 * (@renehermi)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/config-error-3/#post-9644311)
 * Hi,
 * the issueis caused by missing write permissions to the wp-config.php file.
 * Youc an bypass this:
 * In the black log window you find the staging table name. Usually something like
   wpstg1_ wpstg2_ etc.
    Open wp-config.php in yourwebsite/subfolderStaging/ with
   a text editor, find the entry table_prefix = and change the corresponding value.
 * Alternatively you need to give 644 write permissions to the wp-config.php and
   try to create another clone.
 *  Thread Starter [222](https://wordpress.org/support/users/222-1/)
 * (@222-1)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/config-error-3/#post-9653340)
 * Thank you!
 * But now I have another problem. The staging site seems to have taken over the
   username and password and I can’t get into the main site. My login wasn’t working,
   so I tried the Lost Password to reset it and it says that there’s no user with
   my email address.
 * When I go into myphpadmin for my main site, I can see my user account (with my
   email address) and one I created on the staging site. But those logins are only
   working on my staging site and not the main site.
 * How can I get back into my main site so I can find the staging table name?
 * Thanks
 *  Plugin Author [Rene Hermenau](https://wordpress.org/support/users/renehermi/)
 * (@renehermi)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/config-error-3/#post-9654613)
 * You need to change the wp-config.php of the staging site NOT the one of the live
   site. This is essential.
 * You find the staging site in sub folder of your live site example htdocs/staging-
   site/wp-config.php
 * Cheers
    René
 *  Thread Starter [222](https://wordpress.org/support/users/222-1/)
 * (@222-1)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/config-error-3/#post-9655192)
 * Thanks, but the problem is it won’t let me into the main site so I can get that
   table code. I tried a made up table code on the staging site config so it was
   different from the main site’s config, but the login credentials are still not
   working on the main site.
 * Then I deleted the config in the staging site to try to force it to go back to
   the main site (the main site config is there and hasn’t changed), and now when
   I try to login to the main site, I get the message below:
 * unused
 * The server encountered an internal error or misconfiguration and was unable to
   complete your request.
 * Please contact the server administrator, [webmaster@samanthamclark.com](https://wordpress.org/support/topic/config-error-3/webmaster@samanthamclark.com?output_format=md)
   and inform them of the time the error occurred, and anything you might have done
   that may have caused the error.
 * More information about this error may be available in the server error log.
    —
   Thanks for your help. Once I can get back into the main site I redo all the staging
   and change the config table code.
 *  Thread Starter [222](https://wordpress.org/support/users/222-1/)
 * (@222-1)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/config-error-3/#post-9657061)
 * Hi,
    I got into the main site. I’m deleting the staging site now and will try
   again, hopefully without any problems this time. Thanks

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

The topic ‘Config error’ is closed to new replies.

 * ![](https://ps.w.org/wp-staging/assets/icon-256x256.png?rev=2972932)
 * [WP STAGING - WordPress Backup, Restore & Migration](https://wordpress.org/plugins/wp-staging/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-staging/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-staging/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-staging/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-staging/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-staging/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [222](https://wordpress.org/support/users/222-1/)
 * Last activity: [8 years, 7 months ago](https://wordpress.org/support/topic/config-error-3/#post-9657061)
 * Status: resolved