pradeepsinghh
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Error establishing a database connectionHey John,
Great question — and I understand the confusion. Just to clarify: the
wp_userstable is where your site’s user accounts are stored, but it’s not related to the database connection credentials.The database credentials that WordPress uses to connect to MySQL are stored in the
wp-config.phpfile — specifically:phpCopy
Edit
define('DB_NAME', 'your_database_name'); define('DB_USER', 'your_database_username'); define('DB_PASSWORD', 'your_database_password'); define('DB_HOST', 'localhost');If those values are incorrect (for example, wrong
DB_USERorDB_PASSWORD), you’ll get the “Error establishing a database connection” message.The
wp_userstable just controls access to WordPress admin — not access to the database itself.If you’re troubleshooting this error, we recently shared a complete guide that breaks down both common causes and server-level solutions in plain language — feel free to check it out : https://brandpex.com/how-to-fix-the-wordpress-error-establishing-a-database-connection/
Forum: Fixing WordPress
In reply to: Error establishing a database connectionHey John,
Great question — and I understand the confusion. Just to clarify: the
wp_userstable is where your site’s user accounts are stored, but it’s not related to the database connection credentials.The database credentials that WordPress uses to connect to MySQL are stored in the
wp-config.phpfile — specifically:phpCopy
Edit
define('DB_NAME', 'your_database_name'); define('DB_USER', 'your_database_username'); define('DB_PASSWORD', 'your_database_password'); define('DB_HOST', 'localhost');If those values are incorrect (for example, wrong
DB_USERorDB_PASSWORD), you’ll get the “Error establishing a database connection” message.The
wp_userstable just controls access to WordPress admin — not access to the database itself.If you’re troubleshooting this error, we recently shared a complete guide that breaks down both common causes and server-level solutions in plain language — feel free to check it out on the “how to fix the WordPress error establishing a database connection”.
You’re seeing the “Error establishing a database connection” because your MySQL user has exceeded the maximum allowed database connections — specifically:
User ‘xxxxxxxxx’ has exceeded the ‘max_user_connections’ resource (current value: 100)This is not an issue with credentials (username/password/hostname), but rather a server resource limit imposed by your hosting provider.
What This Error MeansYour hosting account is limited to 100 simultaneous MySQL connections, and currently that limit is being hit. This can cause WordPress to fail connecting to the database, leading to that error message.
Step-by-Step Fix
1. Temporary Fix: Restart MySQL or WaitIf you’re on a shared or managed host, try:
- Waiting for a few minutes — connections may close automatically.
- Contacting your host to restart MySQL or kill idle connections.
If you’re on a VPS or dedicated server, run:
sudo systemctl restart mysql2. Optimize and Reduce Simultaneous Connections
Too many connections usually happen due to:
- Poorly coded plugins or themes
- High traffic spikes
- Slow queries or unclosed DB connections
➤ Fix it by:
- Disabling all plugins temporarily:
Renamewp-content/pluginstoplugins_oldvia FTP or cPanel - Switch to a default theme (like TwentyTwentyThree) temporarily
- Add this to your
wp-config.phpto limit persistent DB connections:
define('WP_ALLOW_REPAIR', true);Then visit:
https://yourdomain.com/wp-admin/maint/repair.php3. 📈 Monitor & Limit Simultaneous ConnectionsIf you’re allowed to access your
my.cnfor MySQL config, you can:- Check how many active connections exist:
SHOW PROCESSLIST;- Kill idle ones manually:
KILL [connection_id];- Increase the limit (if on VPS or dedicated):
[mysqld] max_user_connections=200⚠️ Note: You can’t increase
max_user_connectionson shared hosting. Contact your hosting provider for help or upgrade your plan.
4. Clean & Optimize Your DBInstall a plugin like:
- WP-Optimize
- Advanced Database Cleaner
These help by:
- Removing stale transients
- Reducing auto-saves and post revisions
- Cleaning overhead and garbage entries
5. 🛠️ Use Persistent Object Caching (Advanced)
If your hosting supports Redis or Memcached, enabling object caching can reduce DB load. 6. ☁️ Consider Moving to Higher Resource Hosting
If this error keeps repeating, it’s a clear sign that your current hosting plan is insufficient. Consider:
- Moving to a VPS (like DigitalOcean, Cloudways)
- Or Managed WordPress hosting (like Kinsta, WP Engine)
- This reply was modified 11 months, 2 weeks ago by pradeepsinghh.
Forum: Plugins
In reply to: [Registration Options for BuddyPress] Modify User Profile Before ApproveI am using Gwangi theme which is basically community/social based theme.
I just need to put some functionality where admin can assign the BP Membership Type while Approving the User Signup Request. If it is possible.Thanks Mostafa
No Reply on Support
Forum: Plugins
In reply to: [Fixed Widget and Sticky Elements for WordPress] Multiple Stop-ID?i am also looking for the solution of multiple Stop-id.
- This reply was modified 6 years, 5 months ago by pradeepsinghh.