• I can’t seem to understand how I can change the table prefix wp_ into something more unique. I want to know where and when exactly to change it during a fresh WP installation.

    I learned to go to wp-config.php and change $table_prefix = ‘wp_’ into my own. But when? I tried the following:
    -installed WP application with installatron.
    -went to files, wp_config.php and changed wp_ into sock_
    -went to ….com/wp-admin and finished the WP install

    This doesn’t seem to do the trick, because the standard wp_ prefix is still in most files. wp_posts and wp_users etc. Only the wp_ in wp-config.php is changed.

    How to really change this prefix, and also; how to be sure I’ve changed it correctly?
    Without using a plugin, it’s for a fresh, brand new, installation.

Viewing 5 replies - 1 through 5 (of 5 total)
  • You should change it when you do the installation of WordPress. There is a field that gives you the option of changing the table prefix.

    You’ll need to change it in wp-config.php indeed, but before you install, then it will assign those prefixes in the database.

    Whatever you find in files will/should not be affected. Internal functions just happen to start with wp_ as well, but they have no relation to the database prefix (which is, of course, by default also wp_).

    Thread Starter olifantje

    (@olifantje)

    There’re indeed some fields I can fill in things like “table prefix” during a new installation. Normally that’s filled in automatically, so it works even if you are new to this: database management: ‘Automatically manage the database settings for me. (Recommended)‘. So they fill in wp_ as a prefix.

    If I say I want to do this manually, so I can use my own prefix, they want me to fill in other things too which I have no clue about (database info). How to know what to put in all the other fields?

    The “one click installs” usually skate over the more advanced options, sticking to the strict essentials.

    What you can do AFTER installing is to install a plugin “All in one WordPress security”, it will coach you in what should be changed, and do the changes for you.

    If I say I want to do this manually, so I can use my own prefix, they want me to fill in other things too which I have no clue about (database info). How to know what to put in all the other fields?

    Those other things would be your database name and your MySQL User and Password first typically first made and assigned (User to database) at cPanel (MySQL Databases). Altogether, and as here excerpted from wp-config.php:

    /** The name of the database for WordPress */
    /*-*/
    define('DB_NAME', 'database_name_here');
    /** MySQL database username */
    define('DB_USER', 'username_here');
    /** MySQL database password */
    define('DB_PASSWORD', 'password_here');
    
    $table_prefix  = 'wp_';

    Edit: However, it has just now struck me from your post here that the installer can apparently do the cPanel work for you if you add those things as you have mentioned.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘When and where to change prefix wp_’ is closed to new replies.