How to change wp table prefix in WordPress

Поділитися
Вставка
  • Опубліковано 6 січ 2015
  • This Video shows to secure wordpress from hackers.
    Steps Followed:
    Open the Wp config.Php file of the WordPress, In the file search this :
    $table_prefix = 'Instance_';
    Against table_prefix we have used string as Instance, you can use anyname you want
    The name you entered will change the default wp_ table prefix in the database.
    Run the Wampserver on your Machine.
    Now click on PhpMyAdmin
    In PhpMyAdmin select the database where you want to make the changes.
    Now under that database click on Sql, here we need to execute some commands, to change the wp_ default table prefix to our declared Instance
    As there are total 11 (Eleven) tables where we need to change the wp_ default table prefix
    Query we would use for all 11 changes would be:
    RENAME table `wp_commentmeta` TO `Instance_commentmeta`;
    RENAME table `wp_comments` TO `Instance_comments`;
    RENAME table `wp_links` TO `Instance_links`;
    RENAME table `wp_options` TO `Instance_options`;
    RENAME table `wp_postmeta` TO `Instance_postmeta`;
    RENAME table `wp_posts` TO `Instance_posts`;
    RENAME table `wp_terms` TO `Instance_terms`;
    RENAME table `wp_term_relationships` TO `Instance_relationships`;
    RENAME table `wp_term_taxonomy` TO `Instance_taxonomy`;
    RENAME table `wp_usermeta` TO `Instance_usermeta`;
    RENAME table `wp_users` TO `Instance_users`;
    Now update user meta fields so that application won't prevent you to log in.
    Query:
    UPDATE `Instance_usermeta` SET `meta_key` = REPLACE( `meta_key`, 'wp_', 'Instance_' )
    Update options table data, Query we would use here is :
    UPDATE `Instance_options` SET `option_name` = 'Instance_user_roles' WHERE `option_name` = 'wp_user_roles'

КОМЕНТАРІ • 14

  • @tonyshaw5154
    @tonyshaw5154 7 років тому

    Followed step by step I had a problem with wow commerce but still fixed it just follow step by step Cheers Anthony

  • @Billmorganmedia-pix
    @Billmorganmedia-pix 9 років тому

    Thank you for your clear and very helpful advice.

  • @gameplaats370
    @gameplaats370 4 роки тому +1

    I have duplicate tables. What do I need to do?

  • @MichaelThomasDev
    @MichaelThomasDev 9 років тому +1

    Thanks dude

  • @knat632
    @knat632 6 років тому

    Great, thanks

  • @sultanmahmud9804
    @sultanmahmud9804 6 років тому

    but when I login wp_login.php then its redirect to wp install.php. how can i solve this

  • @gunjannagpal3142
    @gunjannagpal3142 8 років тому

    Thanks

  • @hallucinogist
    @hallucinogist 5 років тому

    I changed my table prefix from wp_ and when I applied the new one, it wanted me to reinstall wordpress? is that normal?

    • @shiccotech265
      @shiccotech265 4 роки тому

      Melanie, you needed to change wp_ in the database as well. Did you?

  • @MuradAbuseta
    @MuradAbuseta 9 років тому

    you save me man thank you

  • @CodingBank
    @CodingBank 9 років тому

    Please comment me this source code.

  • @mikemoy5245
    @mikemoy5245 4 роки тому

    Guys do not change your table prefix, it will do nothing to improve your security. On the flip side it can create problems for you. It is a loose loose situation. People telling you to change your database and table prefixes don't understand WordPress security.

  • @denduong8088
    @denduong8088 7 років тому

    quat