.htacces editor broke/help (have pro version)

#989999
  • Resolved J S
    Rank Math free

    Hello,

    I’m working on a site that has the pro version of RankMath and I stupidly copied the wrong table of data to input in the .htaccess editor. I included a way too restrictive content security policy and am now unable to edit the .htaccess again (I click the I accept risks box, but can’t edit like previously), reload wp from updraftplus backup, use wp file manager, and even an emergency fix to functions.php hasn’t took… I tried to export my rankmath settings for you, but when I click export just nothing happens. Is there anything I can do short of cpanel or ftp to remove that line, restore previous .htaccess, or even just a default? As I understand it just deactivating rankmath, doing my backup reload, then reactivating wont clear it.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hello,

    We apologize for the issue you are facing with the .htaccess editor in Rank Math. It sounds like a challenging situation, and we appreciate you reaching out for help.

    Since you are unable to edit the .htaccess file through Rank Math due to the restrictive content security policy you implemented, here are a few steps you can take:

    1. Restore from Backup: If you have a backup of your .htaccess file, you can restore it using your backup solution. Since you mentioned UpdraftPlus, ensure that the backup includes the .htaccess file.

    2. Access via FTP or cPanel: If possible, accessing your website files through FTP or cPanel is the most straightforward way to fix this issue. You can navigate to the root directory of your website, locate the .htaccess file, and edit or replace it directly. Here’s how:

      • Log in to your FTP client or cPanel File Manager.
      • Find the .htaccess file in the root directory of your website.
      • If you have a backup of the original .htaccess file, upload it to replace the current one. If not, you can create a new default .htaccess file with basic WordPress rules:

        # BEGIN WordPress
        
        RewriteEngine On
        RewriteBase /
        RewriteRule ^index.php$ - [L]
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule . /index.php [L]
        
        # END WordPress
    3. Editing via Functions.php: If you have tried adding code to your functions.php file without success, ensure that the code is correctly placed and that there are no syntax errors. You can also try adding the following filter to allow editing:

      add_filter( 'rank_math/can_edit_file', '__return_true' );
    4. Exporting Settings: If the export function is not working, it may be due to a JavaScript error or conflict with another plugin. You might want to check your browser’s console for any errors when trying to export.

    If none of these options work and you still cannot access your site, please reply to this ticket with your site URL so that we can assist you further. A human agent will take over and provide more tailored support.

    Thank you for your patience, and we hope to resolve this issue for you soon!

    J S
    Rank Math free

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Hello,

    You should be able to edit the .htaccess file from your cPanel file manager or FTP. Here’s how you can do that: https://help.vernalweb.com/kb/create-or-edit-htaccess-file-cpanel/

    If you still face the issue with Rank Math, please follow this guideline to check if any other plugins/themes are conflicting with Rank Math: https://rankmath.com/kb/check-plugin-conflicts/

    Let us know how it goes. Looking forward to helping you.

    Thank you.

    J S
    Rank Math free

    This was for a client’s site, so unfortunately no cPanel or FTP access without letting them know I screwed something up. Absolutely everything was locked out as JavaScript was disabled then, so when I click on different plugin options, it just did nothing. Fortunately, I was finally able to resolve this by creating a custom plugin to overwrite the issue. Here’s the code for that just in case you’re interested. https://docs.google.com/document/d/1qBEMUkd4JmqRgNC-VYF18eCnZSS0pDMV7ppERVj7f_s/edit?usp=sharing

    This is resolved now, thanks for your time.

    Hello,

    We’re delighted to hear that this issue has been resolved. We appreciate your feedback.

    This ticket will be closed now, but if you ever have another question or need any help in the future, please don’t hesitate to create a new forum topic. We’ll be more than happy to assist you.

    Thank you.

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

The ticket ‘.htacces editor broke/help (have pro version)’ is closed to new replies.