Title: wp-config-sample vs wp-config
Last modified: August 30, 2016

---

# wp-config-sample vs wp-config

 *  Resolved [asiersanmi](https://wordpress.org/support/users/asiersanmi/)
 * (@asiersanmi)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/wp-config-sample-vs-wp-config/)
 * Hi all,
 * I’m trying to install WP. I have followed all the steps properly (I think) but
   when I change the name of the file after editing the DB_NAME, DB_USER and DB_PASSWORD
   It is giving an error “Error establishing a database connection”
 * So, it is working with the sample file but not when I rename it.
 * Any help?
 * Many thanks!!!!!

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

 *  Moderator [t-p](https://wordpress.org/support/users/t-p/)
 * (@t-p)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/wp-config-sample-vs-wp-config/#post-6405987)
 * Error connecting to your database:
    In nutshell, you’re getting this error because
   WP is unable to establish a database connection. Reason why WP is unable to establish
   a database connection can vary. It could be that your database login credentials
   are wrong or have been changed. It could be that your database server is unresponsive.
   It could be that your database has been corrupted. Majority of the times this
   error happens because of some sort of server error. Also, there could be other
   factors as well. To troubleshooting this problem: – double check your [wp-config.php file settings ](http://codex.wordpress.org/Editing_wp-config.php)
   for the database name, database username and database password, and the host 
   name (e.g., “localhost” Vs. something else). This is where most errors occur.–
   Then make sure wp-config.php is in right location. – Then check that you don’t
   need to change the database host from “localhost” to something else. You can 
   get that info from your hosting provider. – Check you have actually created a
   database with the same database name as is in your wp-config.php file. – Last,
   but not least, if all that information is correct your database probably has 
   a problem with it. Contact your hosting provider if the database server is offline(
   if the problem suddenly happened), or if they have any other problem at their
   end, or they made any changes to your account, or if there are any limitations/
   restrictions, or if the hosting package is set to Windows and not Linux, etc.–
   If the error is intermittent then it’s your server. What’s happening is that 
   the web server and/or the database server are gettign overloaded and the connection
   is droping out or is refused for a short time. That gives you the database error
   as the website can’t connect to the database. To fix this, you’ll need to talk
   to your hosting company as they are the only ones that can do anything about 
   hardware issues like this. – There are also many threads on this topic on these
   forums: [http://wordpress.org/search/Error+establishing+a+database+connection?forums=1](http://wordpress.org/search/Error+establishing+a+database+connection?forums=1)
 *  Thread Starter [asiersanmi](https://wordpress.org/support/users/asiersanmi/)
 * (@asiersanmi)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/wp-config-sample-vs-wp-config/#post-6406003)
 * Thanks for the answer but I’m not sure that is the problem.
 * I followed most of the instruction, I’ll try to explain in more detail.
 * Before accessing to localhost I edited the wp-config-sample.php file changing
   the DB_NAME, DB_USER and DB_PASSWORD values.
 * Then I change the file name to wp-config.php
 * I access to localhost and it gives me the error
 * I rename the file back to wp-config-sample.php and it works. The WP Installation
   appears
    I have tried many different things but I’m still stuck 🙁
 * Thanks for your help!!!
 *  [HostPuma](https://wordpress.org/support/users/hostpuma/)
 * (@hostpuma)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/wp-config-sample-vs-wp-config/#post-6406099)
 * Try re-uploading all WordPress files and re-installing your blog with a clean/
   fresh database.
 *  [sherrieroderick](https://wordpress.org/support/users/sherrieroderick/)
 * (@sherrieroderick)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/wp-config-sample-vs-wp-config/#post-6406100)
 * I’m using 4.3 and I don’t have the plug-in menu option. Also, do I need to host
   my site/blog somewhere else or can wordpress do it all?
 *  [HostPuma](https://wordpress.org/support/users/hostpuma/)
 * (@hostpuma)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/wp-config-sample-vs-wp-config/#post-6406101)
 * sherrieroderick if you need help, create a new topic.
 *  Thread Starter [asiersanmi](https://wordpress.org/support/users/asiersanmi/)
 * (@asiersanmi)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/wp-config-sample-vs-wp-config/#post-6406111)
 * I have tried it and I didn’t reach neither to the installation point.
 * When I started the installation it said that the wp-config.php file was going
   to be created during the process, but I can’t see it.
 * So finally I followed with the wp-config-sample.php file. Is there any problem?
   Why do we need to rename it?
 * Many thanks!!!!!
 *  Moderator [t-p](https://wordpress.org/support/users/t-p/)
 * (@t-p)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/wp-config-sample-vs-wp-config/#post-6406112)
 * Useful installation guide: [https://codex.wordpress.org/Installing_WordPress](https://codex.wordpress.org/Installing_WordPress)
 *  Thread Starter [asiersanmi](https://wordpress.org/support/users/asiersanmi/)
 * (@asiersanmi)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/wp-config-sample-vs-wp-config/#post-6406173)
 * It seems that in the last stable version, the wp-config-sample file is needed
   for the installation.
 * After that, the process itself generates de wp-config file with the information
   provided during the installation.
 * Many thanks!!!!
 *  Moderator [t-p](https://wordpress.org/support/users/t-p/)
 * (@t-p)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/wp-config-sample-vs-wp-config/#post-6406175)
 * you are welcome 🙂
 *  [Caroline310](https://wordpress.org/support/users/caroline310/)
 * (@caroline310)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/wp-config-sample-vs-wp-config/#post-6406181)
 * Hey Guys 🙂 It seems my site isn’t working on mobile devices. on a laptop or 
   desktop the content shows up over a moving video and on mobile devices the video
   is still/an image. I’m not sure what’s going on here…any advice?
    Thanks!
 *  [Angeloflp](https://wordpress.org/support/users/angeloflp/)
 * (@angeloflp)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/wp-config-sample-vs-wp-config/#post-6406213)
 * Hi
    I have problem whit conet in my Dashboards, reporting the error Can you help
   me? Thank you
 * Warning: include_once(plugin-fw/lib/yit-pointers.php): failed to open stream:
   No such file or directory in /home/virtwww/w_genericindia-com_9767564c/http/wp-
   content/plugins/yith-woocommerce-ajax-navigation/includes/class.yith-wcan-admin.
   php on line 259 Warning: include_once(): Failed opening ‘plugin-fw/lib/yit-pointers.
   php’ for inclusion (include_path=’.:’) in /home/virtwww/w_genericindia-com_9767564c/
   http/wp-content/plugins/yith-woocommerce-ajax-navigation/includes/class.yith-
   wcan-admin.php on line 259 Fatal error: Call to undefined function YIT_Pointers()
   in /home/virtwww/w_genericindia-com_9767564c/http/wp-content/plugins/yith-woocommerce-
   ajax-navigation/includes/class.yith-wcan-admin.php on line 287
 *  Moderator [Jan Dembowski](https://wordpress.org/support/users/jdembowski/)
 * (@jdembowski)
 * Forum Moderator and Brute Squad
 * [10 years, 10 months ago](https://wordpress.org/support/topic/wp-config-sample-vs-wp-config/#post-6406214)
 * [@angeloflp](https://wordpress.org/support/users/angeloflp/) Per the [forum welcome](http://codex.wordpress.org/Forum_Welcome#Where_To_Post)
   please post your own topic.
 * [https://wordpress.org/support/forum/how-to-and-troubleshooting#postform](https://wordpress.org/support/forum/how-to-and-troubleshooting#postform)
 * Your question and this topic are not related.

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

The topic ‘wp-config-sample vs wp-config’ is closed to new replies.

## Tags

 * [wp-config](https://wordpress.org/support/topic-tag/wp-config/)
 * [wp-config-sample](https://wordpress.org/support/topic-tag/wp-config-sample/)

 * In: [Installing WordPress](https://wordpress.org/support/forum/installation/)
 * 12 replies
 * 7 participants
 * Last reply from: [Jan Dembowski](https://wordpress.org/support/users/jdembowski/)
 * Last activity: [10 years, 10 months ago](https://wordpress.org/support/topic/wp-config-sample-vs-wp-config/#post-6406214)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
