WordPress Database Table Prefix change

Home Forums BulletProof Security Pro WordPress Database Table Prefix change

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #36830
    webstar
    Participant

    I acquired a website recently and it uses the default wp_ table name prefix.

    If I install BPS Pro, will it update the prefix name so it’s more obscure?

    #36831
    AITpro Admin
    Keymaster

    Yep, BPS Pro has a DB Table Prefix Changer tool.  You will find it under the BPS Pro menu > DB Backup menu > DB Table Prefix Changer tab page.

    #36832
    webstar
    Participant

    Thanks!

    It worked perfectly. I couldn’t do it manually. So, this was great!

    #39968
    Living Miracles
    Participant

    Hello,

    We recently used the DB Table Prefix Changer tool on a new website we were setting up and we believe there is a glitch/issue occurring with it now that we don’t remember happening before. What we noticed was that after using that tool, the prefix changed for all the tables in the database but all the BPS Pro tables, plus a table for the Monarch plugin we use, seemed to get duplicated. One set of those tables was using the previous/original prefix and the other set was using the new prefix.

    Are you aware of this issue already or is this the expected behavior of this tool? Again, from what we remember, this wasn’t happening before and this may have started to happen since version 14.9. Also, we went ahead and deleted the database tables using the previous/original prefix and everything seems to be working fine still.

    #39969
    AITpro Admin
    Keymaster

    @ Living Miracles – I just tested the DB Table Prefix Changer on a standard single WordPress site type and a Network|Multisite site type and it worked normally.  The DB Table Prefix Changer cannot create duplicate database tables with different table prefixes – that is not possible.  The DB Table Prefix Change gets the existing > $base_prefix = $wpdb->base_prefix; DB table prefix name and replaces it with the new DB table prefix name in the Randomly Generated DB Table Prefix text box.  The DB Table Prefix Changer has not been changed in many years.  So that means the new website you setup already had duplicate database tables (ie cloned, migrated, etc) or a DB restore was done, which created the duplicate database tables.

    #39975
    Living Miracles
    Participant

    Thank you for testing this and finding that the issue doesn’t seem to be on the plugin’s end. As far as we can tell, the new website didn’t have duplicate database tables until we used the DB Table Prefix Changer tool, and we didn’t do a database restore. However, I can mention that several steps prior to using the DB Table Prefix Changer tool, we did use the newish Setup Wizard Export|Import functionality on this site to try to copy over BPS Pro plugin option settings from another site. But, we did check the database tables via phpMyAdmin after importing the settings and we didn’t see duplicate database tables at that time.

    Could this still somehow be the “culprit” of the issue? If not, do you have any other ideas of how this may have occurred for us? Ideally, we’d like to pinpoint the issue so that we can avoid needing to delete some duplicated database tables in the future.

    #39976
    AITpro Admin
    Keymaster

    Nope, the Setup Wizard Export|Import feature only exports and imports BPS Pro plugin option settings stored in the wp_options database table.

    How did you install this new website?  Did you use the WordPress famous 5 minute installation method?  ie /wp-admin/install.php.  Did you manually create the WP Database?  Provide all the details you can so I can take some logical guesses at where the duplicate database tables came from.  They definitely were not created by the BPS Pro DB Table Prefix changer tool.

    Also go to the BPS Pro > Logs & Info menu > System Info page > click the Get Plugins List button > copy all of your installed plugins and paste the list in your forum reply.

    #39980
    Living Miracles
    Participant

    This new site is hosted on a SiteGround Cloud server. WordPress was installed on this site using their built-in WordPress web application installer in Site Tools (their own custom replacement for cPanel). The WordPress database was automatically created through their WordPress installer process, so no, we didn’t manually create the database. I’m not sure if there really are more details than this to share as much of that initial setup process was “automated.”

    At the time of installing and setting up the BulletProof Security Pro plugin (version 15.1) on the site, the following plugins (and Must-Use plugins) were already installed on the site:

    Advanced Editor Tools (previously TinyMCE Advanced) 5.6.0 - Activated: tinymce-advanced/tinymce-advanced.php
    Akismet Anti-Spam 4.1.8 - Activated: akismet/akismet.php
    BBQ Firewall 20201209 - Activated: block-bad-queries/block-bad-queries.php
    ManageWP - Worker 4.9.7 - Activated: worker/init.php
    Monarch Plugin 1.4.13 - Activated: monarch/monarch.php
    reCaptcha by BestWebSoft 1.60 - Activated: google-captcha/google-captcha.php
    SG Optimizer 5.7.14 - Activated: sg-cachepress/sg-cachepress.php
    Yoast SEO 15.7 - Activated: wordpress-seo/wp-seo.php
    
    Must-Use Plugins:
    ManageWP - Worker Loader - Installed: 0-worker.php

    Please let me know if you need any other pieces of information. Thank you.

    #39983
    AITpro Admin
    Keymaster

    Nothing is jumping out at me as a logical cause of the problem.  So the only thing I can recommend is that if you are going to install another new website using the same methods and steps then as you do each step you should check/recheck your database to see if the duplicate database table problem occurs again.  Let me know if the problem occurs again and at what step/stage of the process.

    #40203
    Living Miracles
    Participant

    Hello,

    Since my last reply on this ticket, we have set up two more WordPress sites and installed BPS Pro on them using the same methods and steps that we usually do. On both of these sites, we checked the database after each step to see if the duplicate database table problem would re-occur or not. Not sure if something changed significantly in the plugin’s code for this but one site we did when BPS Pro was at version 15.2 and we didn’t run into this issue. However, for the second site, BPS Pro was at version 15.3 at that time, and we did run into this problem exactly after using the “DB Table Prefix Changer” tool.

    Hope that helps with troubleshooting this problem that at least we are experiencing. Also, it would be helpful to us if you could explain in simple terms how the “DB Table Prefix Changer” tool works exactly. One of our main concerns with this (other than it not happening to us before a certain previous version of BPS Pro) is that if we clean up our database after this occurs that it could potentially cause an issue on the site that we only discover in the future after the site is public and in full use.

    Thank you.

    #40204
    AITpro Admin
    Keymaster

    @ Living Miracles – I didn’t change any of the DB Table Prefix Changer code besides adding PHP 8 compliance conditional checks to that code.  The DB Table Prefix Changer was thoroughly tested and working in BPS Pro 15.3.  Lately it seems like you are experiencing a lot of isolated issues/problems with some, but not all of your sites.  I understand that your sites are complex and you are using several different hosting environments.  I don’t have a lot of spare time to look at isolated/specific website/server problems right now.  If there are specific and isolated problems occurring on your websites with the DB Table Prefix Changer tool then just don’t use it.  Not trying to blow you off.  I know the DB Table Prefix Changer tool works fine.  😉

    The DB Table Prefix Changer tool does exactly what it sounds like it does > changes the database table prefixes.  Example:  wp_some_db_table_name to xxxxxxxxx_some_db_table_name.  The technical deeper stuff is rocket science so no point in explaining the backend coding part of it.

    So yeah just going to reiterate a few things:

    The DB Table Prefix Changer tool is optional and not essential for security.
    The DB Table Prefix Changer tool does not create duplicate database tables.  So something else on your site is causing that problem.
    It has been thoroughly tested and works fine in all past and current versions of BPS Pro and in every possible environment.
    The future problem scenario you are imagining will not occur.
    Recommendation: Do not use the DB Table Prefix Changer tool if it causes you to worry.

    #40207
    AITpro Admin
    Keymaster

    @ Living Miracles – I hope you did not take my response the wrong way.  Lately I have been spending a lot of time fixing things that are outside the scope of the free technical support that I offer for BPS Pro.  ie problems that are caused by other plugins, hosting problems, etc.  That sets the BPS Pro development cycle back, which gets me stressed out.  The DB Prefix Changer tool is not important at all.  So yeah just don’t bother using it.

Viewing 12 posts - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.