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?
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?
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.