free classified ads and leads
domain website price


Solved Wordpress Error establishing a database connection

Wordpress Tips Plugins and Security

Wordpress is top most used CMS in the world. You can create any type of website into Wordpress like Pharma, Packers and Movers, Hospital , School etc.

Some time you face the issue into wordpress website like “Error establishing a database connection”  when open the website. To solve this problem follow the below instruction .

 

  1. First check the database username and password is correct. OR recreate the password and used the new one. check the wp_config.php file about what you entered into it.  If something wrong then correct it. Make sure you connection is successful when using the database login details using mysqli_connectoion fuction.
  2. Next is rename the wp_content > plugins directory to plugins_del . So that refresh the website . Some time currupt plugins create the problem. If all ok then move the plusings one by one into plugins folder from plugins_del folder. You easily found the corrupt  plugin which create the problem.
  3. open the wp_config.php file and write the below line at the bottom of page.

    define('WP_ALLOW_REPAIR', true);

    After that open the www.websitename.com/wp-admin/maint/repair.php file to repair the database table. Some time tables corrupted and show the error.

    You can repair the database from cpanel > phpMyAdmin > select database > select tables > select repair and optimize it .
  4.  Last option is to take backup of database from cpanel.  create the new database and import the database copy here. 

 

Bookmark and Share




Gallery

Related Topics

Comments



Submit Reviews:


(Enter the characters seen on the image below.)



Promotional Ads

Advertisement

Packers and movers in Mohali
Plot No 636, Near HP Gas Agency, Dariya, Chandigarh - 160101
Mohali

Submersible Sludge Pumps
18, shreenath Estate, cross road, nr. Nikol, nr. Sardar Patel Ring Road, Kathwada, Gujarat 382415
Ahmedabad

Bhakti Bird Proofing
House no.9479 durgamata tekdi vibhag, mahalaxmi nagar, City ambernath, Near durgamata temple. Pin Code-421501
Motilal Nagar Mumbai

Livonta Global Pvt.Ltd
1110, Colonnade, B/H Iscon Temple, Opp. Iscon BRTS Bus Stand
Iscon - Ambali Rd,
Ahmedabad

Brij Agnihotri & associates company secretaries
3454, 40D, Sector 40D, Chandigarh, 160036, India

JB Rock Bolts & SN BOLTS
10 A & B Industrial Area (at Vill. Nangal Jarialan)
Distt. Una Himachal Pradesh
Una

Govinda resorts Lonavala
Old Mumbai - Pune Hwy, Maval, Lonavala, Maharashtra 410405
Lonavla

Steelco Metal & Alloys
192 – Minara Mansion, Shop No.6, Sant Sena Maharaj Marg, 2nd Kumbharwada Lane, Mumbai, Maharashtra 400004
Mumbra Mumbai

Best Resorts in Dharamshala Amid the Misty Hills.
SATOBARI HILLS ROAD,MCLEODGANJ,
Dharamshala

Genius Global School
194 Anand Vihar Saproon, Solan, Himachal Pradesh
Ambala Cantt