Support » Localhost Installs » Updated table prefix and lost access to the site – local development

  • Resolved betweenbrackets

    (@betweenbrackets)


    Hello,

    I’m working with the Seedlet theme and trying to update my table prefixes as recommended to harden a WordPress site. This practice is in the “Security By Obscurity” section here: https://wordpress.org/support/article/hardening-wordpress/

    “Change the table_prefix: Many published WordPress-specific SQL-injection attacks make the assumption that the table_prefix is wp_, the default. Changing this can block at least some SQL injection attacks.”

    I can access the site. I make the update. I receive a “Sorry, you are not allowed to access the page” message. Yesterday, I downloaded a fresh instance of both Core and the Seedlet theme and no plugins, attempted the update, and the error persisted. I updated the .htaccess file and the error persisted.

    I’m building this locally, MacOS Catalina (10.15.7) with Apache, MySQL, and PHP. I use PHPMyAdmin.

    I iniitially posted this in the Seedlet theme support forum and it was suggested that I post here.

    Guidance appreciated.

    Many thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The table prefix specified in your wp-config.php file MUST match the table prefix in the names of your mysql tables. It seems likely (though unspecified) that you changed the table prefix in your wp-config.php file and nothing else. If this is the case then change it back.
    Some of the security plugins do this change correctly, they update both the config file and rename the tables, suggest that you use one of these.

    Thread Starter betweenbrackets

    (@betweenbrackets)

    Hey, thank you.

    Updating the wp_config.php is part of my work flow when updating the table names and rows. Thanks for checking that.

    I’ve been troubleshooting this off and on for a couple of days. What I’ve found is that there is a lag between making the updates and accessing the site. If I wait, then I can access. Not sure why this is occurring here so I’ve noted it as I move along in developing up the site that I’m working on.

    Thanks! Have a lovely day. =)

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