WordPress Me Error Establishing A Database Connection Fix Kaise Kare

WordPress par unlimited features hote hai. Jisse user ko apna blog manage karne me asaani rehti hai. Lakin ye bhi ek sach hai ki aapki ek chhoti si mistake aapki puri site ko down kar sakti hai. Usi me se ek hai error establishing a database connection. Jise hum aaj is Hindi tutorial me alag alag tarike se fix ya solve karna sikhege.

Jab aap wordpress platform par blogging karte hai to usme bahut si errors ya problems ka samna kar padh sakta hai. Jise fix karna beginners ke liye thoda mushkil kaam hai. But don’t worry ye post padhkar aapko error establishing a database connection massage ko fix karne koi dikkat nahi hogi. Agar aapki site me koi aur trouble hai to aap humari wordpress related articles padhe.

fix Error Establishing A Database Connection

WordPress website mainly php & MySQL two types ke languages se bani hoti hai. Aapko ye jankari honi chahye ki ye kaise kaam karti hai. Simple words me batau to PHP codes me aapki site ki har detail ko store kiya jata hai, jaise ki themes, plugins, media ya text files, documents etc. Par ye data web site me display karne ke liye PHP coding ko MySQL database se connected hona chahye.

MySQL database site ka important part hai. Jo sabhi PHP files identify karne ke baad hi web page display karta hai.

Agar aap isme thodi si bhi mistake karoge to error establishing a database connection message display hoga.

To chaliye ise troubleshoot ya fix karna sikhte hai.

How to fix error establishing a database connection in wordpress – 3 Easy tricks

Fix error with database repair

Database repair karne se pehle ye ye confirm karle ke aapke site ke front-end me same error massage show ho raha hai ya fir different.

Example ke liye agar aapki home pe yani ki yourdomain.com & yourdomain.com/wp-admin/ par same error establishing a database connection issue hai to aapko ye step try karne ki jarurat nahi hai.

Par agar aapke wp-admin page par “One or more database tables are unavailable. The database may need to be repaired” kuch is tarah ka masaage display ho raha hai to aapko database repair option se fix karna padhega.

Database repair karne ke liye aap apni wp-config.php file me niche likha code just ‘That’s all, stop editing! Happy blogging’ line ke upar (above) add kare.

define('WP_ALLOW_REPAIR', true);

Note: Wp-config.php file aap apne hosting cpanel me file manager >> public_html >> domain root >> wp-config.php >> edit se parapat kar sakte hai.

Upar wala code add karne ke baad aap http://www.yourdomain.com/wp-admin/maint/repair.php par visit karke settings repair kar sakte ho. Example ke liye niche image me dekhe.

fix Error Establishing A Database Connection fix

Yaha aap upar image me dekh sa sakte ho ki database repair ke two options hai. Mai suggest karuga ki aap “Repair and Optimize Database” select kare. Kyuki iske liye aapko login karne ki jarurat nahi padhegi aur aur security ke liye se bhi ye faydemand rahega.

Repair & optimize database finished hone ke baad wo upar code jo aapne wp-config.php file me add kiya tha, usko remove karde.

I hope is ye process error establishing a database connection massage fix karne me helpful rahegi. By chance agar abhi aapko same issue mil raha hai to next step se problem ko troubleshoot kare.

Wrong credentials in wp-config.php file

Wp-config.php file WordPress me ek chhoti si but bahut important file hoti hai. Jab aap hosting par WordPress install karte ho to ye file automatically create ho jati hai. Jisme high level configuration settings hoti hai. Agar is file me koi bhi error ata hai to aapka blog open hona band ho jata hai.

Actually jab aap WordPress database username and passwords ko modify karte to ye setting ko wp-config file me bhi update karna padta hai. Agar aap aisa nahi karte to aapko aapki website error establishing a database connection massage show hoga. Jise aapko manually fix karna hota hai.

define('DB_NAME', 'database-name');
define('DB_USER', 'database-username');
define('DB_PASSWORD', 'database-password');
define('DB_HOST', 'localhost');

Upar coding anusar check karle aapki wp-config.php file me same settings hai. Agar nahi to usey fix kare.

Yaad rahe ye jaruri nahi DB_NAME humesha “localhost” ho. Ye aapke web hosting provider par depend karta hai. India ke most popular hosting provider jaise HostGator & Bluehost, localhost hai.

Overloaded traffic

Har koi apne blog par jyada se jyada traffic pana chahta hai. Par kya aapko pata kabhi kabhi jyada traffic ki vajah se site down ho jati hai. Yani ki apne hosting provider se aapne jo package (specially shared hosting plans) khairda hua hai wo traffic ko handle nahi kar pa raha hota. Jisse site par error establishing a database connection massage show hota hai. Isilye experts high traffic site ki speed fast rakhne ke liye VPS ya Dedicated hosting recommend karte hai.

Iska dusra bada reason aapka web hosting server ka downtime bhi ho sakta hai. Yani ki agar aapka host server down ho jaye to bhi aapki site me problems create ho sakti hai. So mai humesha apne readers ko Hostgator india ya Bluehost India se hosting buy karne ki advice deta hu.

Agar aapne hosting package par multiple wordpress sites installed kiye huye hai to dusri sites par visit karke check kar sakte ho. Agar aapko same issue aa rahe hai to iska matlab hai ki aapka server down chal raha hai.

Aisi conditon me aap apne hosting provider se contact karke apne server downtime ko fix karwa sakte ho.

Check out our reliable web hosting deals here

Apne is wordpress tutorial me maine error establishing a database connection fix karne ke all working tarike mentioned kiye hai. Agar aapko iske ilava bhi aur troubleshooting methods ka pata hai to aap comment box me bata sakte hai. Mai usey bhi post me update karuga.

Www.harpreetkumar.in par wordpress related har tarah ki tutorials Hindi me publish kiye jate hai. Jisse begginers apne WP blog ko easily manage kar sakte hai. Agar aapko is apni site me koi issue ata hai to aap hume contact kar sakte ho.

2 Comments
  1. krishna says

    Really awsome article. Thanx for help

  2. Shyam Arora says

    Apne bahut achi jankari di hai bhai. Hindi blogging me abhi tak kisi ne bhi iske bare menahi likha. Thanks

Leave A Reply

Your email address will not be published.