Title: Database table prefix change
Last modified: May 18, 2020

---

# Database table prefix change

 *  Resolved [Rodrigo](https://wordpress.org/support/users/vejapixel/)
 * (@vejapixel)
 * [6 years ago](https://wordpress.org/support/topic/database-table-prefix-change/)
 * Hello people,
 * You recommend changing the default prefix of the WordPress database which is 
   wp_ to a custom one.
    In the All In One WP Security plugin, on the DB Segurity
   screen ([https://prnt.sc/sj30ri](https://prnt.sc/sj30ri)), it shows that I just
   need to select an option to activate custom prefix change, and then type the 
   custom prefix in a field. Is it that simple, or will I need to make other settings?
 * Another thing … my site is enabled for multisite, and in the main domain all 
   4 options are enabled, but in the subdomains the firewall option is not enabled(
   [https://prnt.sc/sj36sj](https://prnt.sc/sj36sj)). This is normal? Not having
   a firewall on subdomains, could it leave these sub sites vulnerable?
 * And one more thing … for automatic database backup is a full backup of the database?
   
   If my site gives errors, I lose posts and ect, can I restore the backup and everything
   works normally? Is the restoration simple, just pressing a button? What time 
   is the backup done? I would like to make backups every day (once a day). Can 
   this affect the performance of my site? For example, every day starts to back
   up the database during business hours, which is when most access to my site occurs,
   and with that the site is slow. For example, every day starts to back up the 
   database during business hours where it have the most access to my site, and 
   with that the site is slow. So, how to configure backups during the night? Do
   you recommend making daily backups?
 * Thank you!
    -  This topic was modified 6 years ago by [Rodrigo](https://wordpress.org/support/users/vejapixel/).
    -  This topic was modified 6 years ago by [Rodrigo](https://wordpress.org/support/users/vejapixel/).

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

 *  Plugin Contributor [mbrsolution](https://wordpress.org/support/users/mbrsolution/)
 * (@mbrsolution)
 * [6 years ago](https://wordpress.org/support/topic/database-table-prefix-change/#post-12858074)
 * Hi,
 * > it shows that I just need to select an option to activate custom prefix change,
   > and then type the custom prefix in a field. Is it that simple, or will I need
   > to make other settings?
 * Before you go ahead make sure you create a backup of your site or at least your
   database. You just never know if something might go wrong.
 * >  This is normal? Not having a firewall on subdomains, could it leave these 
   > sub sites vulnerable?
 * Please check the following documentation [wordpress-multisite-managing-aiowps-plugin-single-site](https://mbrsolution.com/wordpress/wordpress-multisite-managing-aiowps-plugin-single-site.php)
   regarding a multisite setup.
 * > If my site gives errors, I lose posts and ect, can I restore the backup and
   > everything works normally?
 * Yes, that is the purpose of a database backup. Please check the following documentation
   [how-to-take-a-database-backup-using-the-all-in-one-wp-security-plugin](https://www.tipsandtricks-hq.com/how-to-take-a-database-backup-using-the-all-in-one-wp-security-plugin-6072)
   for more information about restoring your site from a database backup.
 * >  What time is the backup done? I would like to make backups every day (once
   > a day). Can this affect the performance of my site?
 * That all depends on your servers resources.
 * > Do you recommend making daily backups?
 * Yes, if your site has a lot of activities everyday.
 * Let me know if you need more information or help.
 * Thank you
 *  Thread Starter [Rodrigo](https://wordpress.org/support/users/vejapixel/)
 * (@vejapixel)
 * [5 years, 12 months ago](https://wordpress.org/support/topic/database-table-prefix-change/#post-12981059)
 * Hi [@mbrsolution](https://wordpress.org/support/users/mbrsolution/),
 * Can changing the wp_ profix be the way I want it, that is, if I want something
   like japemsj154a7 it would work, or do I need to have the underline sign (_) 
   at the end?
    And do it need to start with wp_ (eg: wp_japemsj154a7_)?
 * If I change the prefix wp_ to one of my preference using the plugin, is the change
   permanent or if I disable the plugin, will the changes automatically revert to
   the default prefix wp_?
 *  Plugin Contributor [mbrsolution](https://wordpress.org/support/users/mbrsolution/)
 * (@mbrsolution)
 * [5 years, 12 months ago](https://wordpress.org/support/topic/database-table-prefix-change/#post-12981858)
 * Hi,
    ** Note: Create a backup first before you begin.
 * > Can changing the wp_ profix be the way I want it, that is, if I want something
   > like japemsj154a7 it would work, or do I need to have the underline sign (_)
   > at the end?
 * I would add the underscore at the end. So your prefix would become for example:
   bob_.
 * > And do it need to start with wp_ (eg: wp_japemsj154a7_)?
 * No, that would defy the purpose of using this feature. The purpose of changing
   the prefix is to remove WordPress default **wp_** prefix set up when you install
   WordPress for the first time.
 * > If I change the prefix wp_ to one of my preference using the plugin, is the
   > change permanent or if I disable the plugin, will the changes automatically
   > revert to the default prefix wp_?
 * Yes, the change is permanent. If you decide to remove our plugin the prefix will
   not change.
 * Let me know if you need more help.
 * Thank you
 *  Plugin Contributor [mbrsolution](https://wordpress.org/support/users/mbrsolution/)
 * (@mbrsolution)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/database-table-prefix-change/#post-13044076)
 * Hi, is your issue resolved?
 *  Thread Starter [Rodrigo](https://wordpress.org/support/users/vejapixel/)
 * (@vejapixel)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/database-table-prefix-change/#post-13262335)
 * Hello [@mbrsolution](https://wordpress.org/support/users/mbrsolution/)
 * I’m sorry for the absence.
 * I made the change to the bd prefix and it was changed in all tables and my site
   remains perfect. Excellent resource.
 * Just a question … This change is definitive, that is, if I need to disable the
   AIOWS plugin, will the prefix be changed back to the default wp_?
 *  Plugin Contributor [mbrsolution](https://wordpress.org/support/users/mbrsolution/)
 * (@mbrsolution)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/database-table-prefix-change/#post-13262357)
 * Hi,
 * >  Just a question … This change is definitive, that is, if I need to disable
   > the AIOWS plugin, will the prefix be changed back to the default wp_?
 * No the prefix will not change back to the default wp_ prefix.
 * Kind regards
 *  Thread Starter [Rodrigo](https://wordpress.org/support/users/vejapixel/)
 * (@vejapixel)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/database-table-prefix-change/#post-13262540)
 * [@mbrsolution](https://wordpress.org/support/users/mbrsolution/)
 * I’m checking it now and I see that part of the images of posts from one of the
   subsites are not loading: [https://prnt.sc/u0a4h4](https://prnt.sc/u0a4h4) | 
   [https://prnt.sc/u0a4yy](https://prnt.sc/u0a4yy)
 * On the main site and other subsites, the post images are loading normally. However,
   some menu images are not loading: [https://prnt.sc/u0a5bb](https://prnt.sc/u0a5bb)
 * It is strange because some images carry and others do not.
 * This problem started as soon as I changed the database prefix.
 * Can you tell me what that might be and how to fix it?
 *  Plugin Contributor [mbrsolution](https://wordpress.org/support/users/mbrsolution/)
 * (@mbrsolution)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/database-table-prefix-change/#post-13262552)
 * Hi, check to make sure it is not related to a cache issue. Also can you confirm
   that your theme is up to date?
 * Regards
 *  Thread Starter [Rodrigo](https://wordpress.org/support/users/vejapixel/)
 * (@vejapixel)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/database-table-prefix-change/#post-13264072)
 * I use the WP-Rocket plugin and used the plugin to clear the cache. I cleared 
   the browser cache. But it didn’t.
    I tried to access the pages through another
   browser, but the images were not loading.
 * When I try to directly access the image that is not loading in the post, I get
   a 403 ([https://prnt.sc/u0h09j](https://prnt.sc/u0h09j)) error. When I insert?
   Nocache at the end of the image url, the image will load normally. However, in
   the post does not load. I tried to insert? Nocache at the end of the post url,
   but it doesn’t solve it.
 * Yes, I am using the latest version of WP (5.5).
 * Before changing the database prefix, I saved the .htaccess file because I saw
   that the plugin would touch this file.
    Now I decided to change the updated .
   htaccess to the previous .htaccess, and the images load normally. It looks like
   the problem is with .htaccess. The plugin made changes to the .htaccess in a 
   way that is preventing some images from loading.
    -  This reply was modified 5 years, 9 months ago by [Rodrigo](https://wordpress.org/support/users/vejapixel/).
 *  Thread Starter [Rodrigo](https://wordpress.org/support/users/vejapixel/)
 * (@vejapixel)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/database-table-prefix-change/#post-13271766)
 * Hello people
 * I think I found the problem.
 * In the .htaccess file there are the lines:
 *     ```
       #<IfModule mod_rewrite.c>
       #RewriteEngine On
       #RewriteCond %{HTTP_REFERER} !^$
       #RewriteCond %{REQUEST_FILENAME} -f
       #RewriteCond %{REQUEST_FILENAME} \.(gif|jpe?g?|png)$ [NC]
       #RewriteCond %{HTTP_REFERER} !^http(s)?://proddigital\.com\.br [NC]
       #RewriteRule \.(gif|jpe?g?|png)$ - [F,NC,L]
       #</IfModule>
       ```
   
 * When requesting to change the prefix, the plugin activated these lines by removing
   the #:
 *     ```
       <IfModule mod_rewrite.c>
       RewriteEngine On
       RewriteCond %{HTTP_REFERER} !^$
       RewriteCond %{REQUEST_FILENAME} -f
       RewriteCond %{REQUEST_FILENAME} \.(gif|jpe?g?|png)$ [NC]
       RewriteCond %{HTTP_REFERER} !^http(s)?://proddigital\.com\.br [NC]
       RewriteRule \.(gif|jpe?g?|png)$ - [F,NC,L]
       </IfModule>
       ```
   
 * I inserted the # again in these lines and now it’s ok.
 * Is it important to leave these lines on?
    If it is important then tell me what
   to do because if I activate these lines again, the images on my site will break
   again.
 * Another thing…
    I realized that in addition to activating these lines in .htaccess,
   the plugin also adds several other lines as soon as it is requested to change
   the database prefix. Are these piles of added lines important? I thought that
   the plugin would only change the prefixes of the database tables. Why are so 
   many lines of code added to .htaccess?
 * If you want me to send the 2 .htaccess files before and after the plugin to change
   the prefix, then send me an email from you.
 *  Thread Starter [Rodrigo](https://wordpress.org/support/users/vejapixel/)
 * (@vejapixel)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/database-table-prefix-change/#post-13486258)
 * Hello guys,
 * I had to disable the AIOWP plugin to check for instability here, but then I activated
   the plugin again. After that, one of my sites (subsite) started to give a problem,
   some images were loaded.
 * So, I checked the .htaccess file and saw that the lines, as I mentioned above,
   were activated (that is, without the #). So, I inserted the # in all lines, as
   above, and the images now load normal.
 * It’s simple to fix, but the problem is that every time I disable and activate
   the AIOWP plugin, will I have to do this process?
 *  Plugin Contributor [mbrsolution](https://wordpress.org/support/users/mbrsolution/)
 * (@mbrsolution)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/database-table-prefix-change/#post-13486331)
 * Hi,
 * > It’s simple to fix, but the problem is that every time I disable and activate
   > the AIOWP plugin, will I have to do this process?
 * I think something else is causing this issue in your site by conflicting with
   our plugin. As far as I know, no one else has reported this. So, this tells me
   that this issue is unique to your site and server configuration.
 * Kind regards

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

The topic ‘Database table prefix change’ is closed to new replies.

 * ![](https://ps.w.org/all-in-one-wp-security-and-firewall/assets/icon-256x256.
   png?rev=2798307)
 * [All-In-One Security (AIOS) – Security and Firewall](https://wordpress.org/plugins/all-in-one-wp-security-and-firewall/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/all-in-one-wp-security-and-firewall/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/all-in-one-wp-security-and-firewall/)
 * [Active Topics](https://wordpress.org/support/plugin/all-in-one-wp-security-and-firewall/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/all-in-one-wp-security-and-firewall/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/all-in-one-wp-security-and-firewall/reviews/)

 * 12 replies
 * 2 participants
 * Last reply from: [mbrsolution](https://wordpress.org/support/users/mbrsolution/)
 * Last activity: [5 years, 8 months ago](https://wordpress.org/support/topic/database-table-prefix-change/#post-13486331)
 * Status: resolved