Default content of WP-CONFIG
If you need example of wp-config.php, then you should better to view wp-confg-sample.php file (in your WordPress root directory) , then create a copy of it and just name it wp-config
. You can also see the sample here , or download WordPress from here and get wp-config.php
file from that package.
P.S. REMEMBER, DONT LEAVE YOUR SITE without wp-config.php even 1 minute!
for Multi-Sites
If you used Multi-site WordPress installation, and for some reasons (i.e. accidentally or i dont know) and you had to re-create wp-config file, then you might need to add such lines (EXAMPLE):
define('WP_ALLOW_MULTISITE', true );
define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', false); //<--------- set it false if using subfolders method
define('DOMAIN_CURRENT_SITE', 'XXXXXXXXXXXXXXXX'); //<--------- your domain name, like: example.com
define('PATH_CURRENT_SITE', '/YYYYYYYYYYYY/'); //<--------- if installed in root folder, then use only / , if installed in subfolder, replace YYYYYYY with folder-name
define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT_SITE', 1);
Note: Dont migrate your wordpress website with “your knowledge”, because you will probably mess-up the site without correction of the database. You should read this when you are about to migrate wordpress website correctly! (the article is critically important in case you have Multi-Site. If not, then it’s still important).
For very old-version WP (<3.0) users: If you are from a previous century and use old version of WordPress, then the best way is to view wp-config-sample.php
file from your installation, because that sample file is the exact type that your installation needs. Because if you have i.e. WP 3.0 version, than after that, some things could have changed, and you might not fit the new files from recent package. If you want to get more details, read codex here. Also, dont forget to change the default values of db_name
,dp_user
,db_pass
,db_host
and etc… You should set your info there. If you don’t know, enter your hosting panel (i.e. cPanel, DirectAdmin or whatever your hosting provider uses) and see that info in “MySQL” databases tab. If there are no Databases created yet, then create one. If it exists already, but you don’t know a password, then you can create/modify current one, and enter that information into wordpress file.