Home › Forums › BulletProof Security Pro › Setup Wizard Root htaccess File Backup
- This topic has 14 replies, 8 voices, and was last updated 4 months ago by
mariahcarey.
-
AuthorPosts
-
AITpro Admin
KeymasterThe Setup Wizard checks your current root htaccess file for any existing custom or additional htaccess code that is not standard WordPress htaccess code or BPS standard htaccess code. This is a one-time event that occurs the first time you install BPS. If the Setup Wizard detects any existing custom or additional htaccess code in your root htaccess file, a message is displayed to you (see below) with a “Download Root htaccess File” button to download your root-htaccess-file.zip file to your computer as a backup.
1. Click the Download Root htaccess File button and then continue with the BPS Setup Wizard setup.
2. For BPS Pro click the Pre-Installation Wizard button and then click the Setup Wizard button. For BPS free click the Setup Wizard button.
3. After you have completed the Setup Wizard setup you can add any custom or additional htaccess code from your downloaded root htaccess file to BPS Custom Code. See the Root htaccess File Custom Code Setup Steps below.Note: If you are not sure where to add your custom or additional htaccess code from your downloaded root htaccess to BPS Custom Code then post your htaccess code in this forum topic and we will tell you where your custom or additional htaccess code goes in BPS Custom Code.
Troubleshooting Info:
If for some reason your website crashes after running the Setup Wizard you can restore your original root htaccess file from the Root htaccess zip file that you downloaded to your computer by doing these steps below:1. Unzip the root-htaccess-file.zip file on your computer.
2. Upload the unzipped .htaccess file to your WordPress installation folder and overwrite the BPS root htaccess file.Additional Plain Text htaccess file backups (BPS Pro 14+ and BPS free 3.5+):
Additional plain text htaccess file backups were created in the BPS Pro 14+ and BPS free 3.5+ Setup Wizard in cases where the the backup zip file was not being created due to some website or host server issue with creating zip files and also as an additional fail-safe method to backup the existing Root htaccess file each time the Setup Wizard is run. The plain text Root htaccess file backups can be found in this folder: /wp-content/bps-backup/master-backups/root.htaccess-[Date-Timestamp]. You would use FTP or your web host control panel file manager to download an htaccess file backup(s) to either restore your previous existing Root htaccess file or copy any custom htaccess code and paste your custom htaccess code into the BPS Custom Code feature text boxes. Note: Since the Setup Wizard creates a new backup of your Root htaccess file each time you run the Setup Wizard, you may see several Root htaccess backed up files in the /wp-content/bps-backup/master-backups/ folder. Each backup file has a Date/Timestamp so you can download the backup file you are looking for by Date/Timestamp.Additional Help Resources & Info:
Custom Code Video TutorialBPS Pro 11.9+ & BPS .53.8+ Root htaccess File Custom Code Steps:
1. Add your custom code in the appropriate Root Custom Code text box.
2. Click the Save Root Custom Code button to save your Root custom code.
3. Go to the Security Modes page and click the Root Folder BulletProof Mode Activate button.Older BPS versions: Root htaccess File Custom Code Setup Steps
1. Enter your custom code in the appropriate Root Custom Code text box.
2. Click the Save Root Custom Code button to save your Root custom code.
3. Go to the Security Modes page and click the Create secure.htaccess File AutoMagic button.
4. Select the Activate Root Folder BulletProof Mode Radio button and click the Activate|Deactivate button.Restoring a backed up Root htaccess File:
1. Download the htaccess file you would like to restore from this folder: /wp-content/bps-backup/master-backups/root.htaccess-[Date-Timestamp].
2. Upload the htaccess file you downloaded to your computer to your WordPress installation folder (same folder where the WordPress wp-config.php file is).
3. Delete or rename the existing htaccess file.
4. Rename the htaccess file you uploaded to your WordPress installation folder to: .htaccess.alexb
ParticipantI have this custom code in my htaccess (automatically added by mainwp child after plugin activation) and am not sure where in the many custom code fields I would have to put this in again. Can you help?
# BEGIN MainWP <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^wp-content/plugins/mainwp-child/(.*)$ /wp-content/plugins/THIS_PLUGIN_DOES_NOT_EXIST [QSA,L] </IfModule> # END MainWP
AITpro Admin
KeymasterI believe you can leave that MainWP htaccess code as is (stand-alone code) and put it in this BPS Root Custom Code text box: CUSTOM CODE BOTTOM HOTLINKING/FORBID COMMENT SPAMMERS/BLOCK BOTS/BLOCK IP/REDIRECT CODE: or you can probably combine the MainWP code into your WordPress Rewrite Loop code and put it in this BPS Root Custom Code text box: CUSTOM CODE WP REWRITE LOOP START:
# WP REWRITE LOOP START RewriteEngine On RewriteBase / # BEGIN MainWP RewriteRule ^wp-content/plugins/mainwp-child/(.*)$ /wp-content/plugins/THIS_PLUGIN_DOES_NOT_EXIST [QSA,L] # END MainWP RewriteRule ^index\.php$ - [L]
alexb
ParticipantThanks! You added this at the bottom:
RewriteRule ^index\.php$ - [L]
Should I add that too, or use exactly what mainwp gives me? Actually, what does that mainwp code do, anyway? I have about 10 sites now where I didn’t add this code to custom and just left the htaccess file as is. will mainwp work without it?
AITpro Admin
KeymasterPersonally I think you should use the first usage: leave that MainWP htaccess code as is (stand-alone code) and put it in this BPS Root Custom Code text box: CUSTOM CODE BOTTOM HOTLINKING/FORBID COMMENT SPAMMERS/BLOCK BOTS/BLOCK IP/REDIRECT CODE: and not try to combine the MainWP code into your standard BPS WP Rewrite Loop code just to keep things as simple as possible.
The standard BPS WordPress Rewrite Loop htaccess code is this below. So you would be combining the MainWP code into the standard BPS WP Rewrite Loop code. In general, the MainWP RewriteRule says to rewrite all files in this folder: /mainwp-child/ to this example folder that you used in your example code: THIS_PLUGIN_DOES_NOT_EXIST and append any Query Strings: QSA. For specific information about what the MainWP code does you would have to ask MainWP about that.
# WP REWRITE LOOP START RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L]
alexb
ParticipantThanks, I’ll use the standard code then. I also have 2 other custom codes in there (those suggested from the top of the bps dashboard – 2 different ones (post request attack and xmlrpc-ddos protection). Should I put the mainwp one right below those or does the order of these codes within that one box not matter?
AITpro Admin
KeymasterThere is no correct order for any code in the BPS Root Custom Code text box: CUSTOM CODE BOTTOM HOTLINKING/FORBID COMMENT SPAMMERS/BLOCK BOTS/BLOCK IP/REDIRECT CODE: All of the htaccess code that goes in this Custom Code text box is stand-alone code.
paulnevin
ParticipantAll wordpress sites using permalinks will have created custom entries in the data.
AITpro Admin
Keymaster@ paulnevin – Yes, that is correct if you are using Pretty or Custom Permalinks and not standard/default Permalinks. BPS incorporates Custom WP Permalinks in the standard BPS htaccess Root htaccess code. So you do not need to add that standard WP code twice/again or you will run into Rewrite Looping problems.
Adebayo
ParticipantEven after I selected the zip file download fix, I still could not download the root htaccess file
AITpro Admin
Keymaster@ Adebayo – This a very old forum topic and newer versions of BPS and BPS Pro create an additional root htaccess file backup (each time the Setup Wizard is run) in this folder: /wp-content/bps-backup/master-backups/root.htaccess-[timestamp]. You can download your original root htaccess file from the /wp-content/bps-backup/master-backups/ folder, copy any custom htaccess code that exists in your backed up htaccess file and paste your custom htaccess code into the appropriate BPS Root Custom Code text box, click the Save Root Custom Code button and you can then run the Pre-Installation and Setup Wizard again. Your custom htaccess code will be combined into your new root htaccess file. If you are not sure where to add your custom htaccess code in BPS Root Custom Code then post your custom htaccess code in your forum reply and I will let you know which BPS Root Custom Code text to copy it to.
Adamw
ParticipantGreat.
netaji73q@gmail.com
ParticipantThanks. Plugin and theme updates are not so hard (I am using GP theme and just a couple of plugins which are Ultimate Blocks and RankMath.) My concern was more on the linux updates or config files etc.
jhone
ParticipantTo ensure the integrity and security of your website, it’s essential to create a backup of your .htaccess file before initiating any changes through a setup wizard. The .htaccess file plays a crucial role in configuring web server settings, such as URL redirection, security protocols, and access control. By backing up this file, you safeguard against potential errors or misconfigurations The Jann Mardenborough Crash that may occur during the setup process. Store the backup in a secure location, allowing you to easily restore your site’s settings in case any issues arise.
mariahcarey
ParticipantThe wizard specifically looks for any existing custom or additional code that deviates from the standard WordPress .htaccess fnaf rules or the default BPS settings. This is important because custom rules can affect how the plugin operates. The wizard specifically looks for any existing custom or additional code that deviates from the standard WordPress .htaccess rules or the default BPS settings. This is important because custom rules can affect how the plugin operates. This check is a one-time event that occurs only during the initial setup. It ensures that any potential conflicts or issues are identified right away, allowing for a smoother integration of the BPS plugin.
-
AuthorPosts
- You must be logged in to reply to this topic.