• So I manually renamed my database prefixes. The site itself seemed to work perfectly and I could login to my admin page (after using force-upgrade.php). However, some plugins were totally missing from my admin dashboard (even though they actually worked fine). There is even an empty space on the sidebar where it used to be Woocommerce. Trying to access it from installed plugins page returned a “you do not have permission” error. The link was /wp-admin/admin.php?page=wc-settings.

    I got scared and reversed the whole process renaming my prefixes back to wp_. But it remains exactly the same now.

    I reckon it may have to do with that admin.php file.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hi,

    The original prefixes are ‘wp_’ not ‘_wp’ which I’m guessing is why reverting it back didn’t work. Thought I would mention that just in case it was either a typo here or when you reversed the process.

    Hope that helps.

    Thread Starter rytisg

    (@rytisg)

    It was a typo here in my post. I meant wp_ .

    Can you copy and paste your wp-config.php here ?

    Thread Starter rytisg

    (@rytisg)

    Update: I tried deactivating Woocommerce and the whole screen just went white. I went to phpMyAdmin and deactivated all plugins manually. I was then able to access the site and tried reactivating some plugins. Same happened again. I deactivated them through phpMyAdmin once again, and was then able to reactivate plugins one by one via my admin dashboard! That’s weird. I can now access Woocommerce plugin as usual, but not some others.

    Here’s my config.php:

    ?php
    /**
    * The base configuration for WordPress
    *
    * The wp-config.php creation script uses this file during the
    * installation. You don’t have to use the web site, you can
    * copy this file to “wp-config.php” and fill in the values.
    *
    * This file contains the following configurations:
    *
    * * MySQL settings
    * * Secret keys
    * * Database table prefix
    * * ABSPATH
    *
    * @link https://codex.ww.wp.xz.cn/Editing_wp-config.php
    *
    * @package WordPress
    */

    // ** MySQL settings – You can get this info from your web host ** //
    /** The name of the database for WordPress */
    //define(‘WP_CACHE’, true); //Added by WP-Cache Manager
    define( ‘WPCACHEHOME’, ‘mysite/wp-content/plugins/wp-super-cache/’ ); //Added by WP-Cache Manager
    define(‘DB_NAME’, ‘dbname’);

    /** MySQL database username */
    define(‘DB_USER’, ‘user’);

    /** MySQL database password */
    define(‘DB_PASSWORD’, ‘password’);

    /** MySQL hostname */
    define(‘DB_HOST’, ‘host’);

    /** Database Charset to use in creating database tables. */
    define(‘DB_CHARSET’, ‘utf8mb4’);

    /** The Database Collate type. Don’t change this if in doubt. */
    define(‘DB_COLLATE’, ”);

    /**#@+
    * Authentication Unique Keys and Salts.
    *
    * Change these to different unique phrases!
    * You can generate these using the {@link https://api.ww.wp.xz.cn/secret-key/1.1/salt/ ww.wp.xz.cn secret-key service}
    * You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.
    *
    * @since 2.6.0
    */
    define(‘AUTH_KEY’, ‘Pmgw^RO|Ti}.{h]}P@}c1[%VGS{p+d1.npun$)_N%#neaMj4NB}Oh2|AXp~mA;# ‘);
    define(‘SECURE_AUTH_KEY’, ‘dj{![sZOMZRqli$dKt/Hb*n=~:|? ad,(HNidz^C8JxqQ5~(=5+FF|?E^qf)dm%}’);
    define(‘LOGGED_IN_KEY’, ‘t5#lLfeVXwsSY(@2qND7YZVVBg$@rCI6|+YHAj9,h&g&L7wz-xoz<Hp`7Cm uQT;’);
    define(‘NONCE_KEY’, ‘Nb5k|e!!r!xM8GJ|Vm1~gU/&l[rga^^uc#bR|L|p!pfX>^v+3)Xt^0HIujz^Q,vs’);
    define(‘AUTH_SALT’, ‘e0E0okU C<@pi:^8e/A004HOc-*myXs2,Fc`kp|{r3R@~|P6u1+q <}x{uu,P{k*’);
    define(‘SECURE_AUTH_SALT’, ‘>+%RKH6nS/yIJe,T$bb0wc+;V]y6Ezd-5&N fCuV*Da+XvS0%1tMJY_u!Cua5wX_’);
    define(‘LOGGED_IN_SALT’, ‘V!#s8zdT68V,Pc<A6T8[fhu8GxH02c1I|77dbTf7DIt=F2FY-TI^%G1_`v%%#a20’);
    define(‘NONCE_SALT’, ‘hw}bJ|>w5wepaP7taLGf-XU+e+B4V:hvew.5N1#G.P-CW#FL]KNac9@da|9Gy4 ;’);

    /**#@-*/

    /**
    * WordPress Database Table prefix.
    *
    * You can have multiple installations in one database if you give each
    * a unique prefix. Only numbers, letters, and underscores please!
    */
    $table_prefix = ‘wp_’;

    ini_set( ‘display_errors’, ‘on’ );

    /**
    * For developers: WordPress debugging mode.
    *
    * Change this to true to enable the display of notices during development.
    * It is strongly recommended that plugin and theme developers use WP_DEBUG
    * in their development environments.
    *
    * For information on other constants that can be used for debugging,
    * visit the Codex.
    *
    * @link https://codex.ww.wp.xz.cn/Debugging_in_WordPress
    */
    /* Switch this value between true and false to enable and disable debugging */
    define(‘WP_DEBUG’, true);

    /* This will log all errors notices and warnings to a file called debug.log in wp-content only when WP_DEBUG is true */
    if (WP_DEBUG) {
    define(‘WP_DEBUG_LOG’, true);
    define(‘WP_DEBUG_DISPLAY’, false);
    @ini_set(‘display_errors’, 0);
    @ini_set(‘error_reporting’, E_ALL & ~E_NOTICE );
    @error_reporting(E_ALL & ~E_NOTICE);
    }

    /* That’s all, stop editing! Happy blogging. */

    /** Absolute path to the WordPress directory. */
    if ( !defined(‘ABSPATH’) )
    define(‘ABSPATH’, dirname(__FILE__) . ‘/’);

    /** Sets up WordPress vars and included files. */
    require_once(ABSPATH . ‘wp-settings.php’);

    You do know that you can deactivate a plugin by renaming it using FTP, as doing anything in database is scary and breakable ? 🙂

    Do you have backups of your database and WP to completely revert back rather then changing stuff back only?

    Thread Starter rytisg

    (@rytisg)

    Yeah, I have a backup but it’s a little old, so it may take a while to get to where I was today…

    Thread Starter rytisg

    (@rytisg)

    Moreover, the options to add new or remove plugin on “plugins” page vanished..

    Anyway, I restored my old database and changed my prefixes automatically with ‘All In One WP Security’ plugin. No problem.

    Glad to hear its all fixed and no problem. It’s really hard to tell from what you changed, to what happened, … Sorry I wasn’t much of help here 🙂

    Happy New Year!

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Problems after renaming WP database prefixes’ is closed to new replies.