0

I'm trying to sort out some problems on a WordPress installation. I created it, and I am the only person with access to the server (at least, I should be), but someone else administers it and can install plugins through the web interface. It's breaking with fatal errors, so my first thought was to disable all plugins, which can be done by editing the database directly.

Step one: access the database:

$ cat wp-config.php | grep DB

and ... nothing.

In fact, here's wp-config.php in its entirety:

<?php
define('WP_CACHE', true); // Added by Cache Enabler

How can this happen? And where else are the database access details stored?

I can't see them anywhere else, either:

# grep -nri db_name
wp-admin/setup-config.php:260:  define('DB_NAME', $dbname);
wp-admin/setup-config.php:330:          case 'DB_NAME'     :
wp-includes/load.php:404:   $wpdb = new wpdb( DB_USER, DB_PASSWORD, DB_NAME, DB_HOST );
wp-includes/ms-load.php:480:            '<code>' . DB_NAME . '</code>'
wp-config-sample.php:23:define('DB_NAME', 'database_name_here');

Where else should I look for database access details? Or should I assume that something has gone horribly wrong?

1 Answer 1

0

A quick way to disable all plugins is to rename the wp-content\plugins folder. You'll get some complaints on the wp-admin pages about missing plugins getting disabled, but you knew that.

Database access details are in the wp-config.php file in the root of your WP installation.

Usually plugins are the main cause of weirdness. Error logs will tell you many things. If you think you need to, reinstall the WP core files (on the admin/update page). Then ensure that all themes and updates are updated. Then, if still weirdness, look at the error logs for help.

2
  • "Database access details are in the wp-config.php file in the root of your WP installation." Well, that's what I thought, too.
    – TRiG
    Jul 6, 2017 at 21:52
  • Yes, that's where they are (normally). See codex.wordpress.org/Editing_wp-config.php for details of the wp-config.php file. Jul 6, 2017 at 21:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.