• I have been using the SiteGround Security Optimizer plugin to enhance the security of a WordPress site. While the plugin offers a useful suite of tools, I encountered a significant and frustrating obstacle with its “Lock and Protect System Folders” feature and the related PHP custom filter mechanism, which proved ineffective in my specific case.

    The Specific Problem: Activating the “Lock and Protect System Folders” option correctly identified and blocked direct access to a PHP JavaScript AJAX file (trp-ajax.php) belonging to a well-known and widely used multilingual translation plugin (TranslatePress). This block manifested as Apache AH01630: client denied by server configuration errors in the server logs. Although the basic translation of pages seemed to function initially, the persistence of these errors indicated an underlying malfunction that could compromise secondary but important AJAX functionalities of the translation plugin.

    Deactivating the “Lock and Protect System Folders” option immediately eliminated the errors, confirming that the block was imposed by this specific SG Optimizer feature.

    Troubleshooting Attempts Following Official SiteGround Documentation: Wanting to keep the folder protection active, I consulted SiteGround’s official guide “How to Use Security Optimizer’s Custom Filters” to create an exception (whitelist) for the legitimate file. The guide indicates using the sgs_whitelist_wp_content PHP filter.

    I implemented the necessary PHP snippet via a dedicated code snippet management plugin (Fluent Snippets), ensuring it was active, globally executed, and that all caches (SiteGround server-side, optimization plugins, browser, CDN if present) were meticulously cleared after each modification and before each test.

    The following path variations for the file to be added to the $whitelist[] array within the function hooked to the sgs_whitelist_wp_content filter were tested:

    1. Full relative path from the wp-content folder: Following the most common logic for WordPress filters operating on a base directory, I tried plugins/translation-plugin-name/includes/file-name.php.
    2. Base filename only: Literally interpreting the extremely simplified example ('file_name.php') provided in the SiteGround guide for the sgs_whitelist_wp_content hook, I tried adding only 'file-name.php'.
    3. Intermediate variations or absolute paths (the latter are generally not used in WordPress filters but were tested for completeness in the initial stages).

    None of these attempts, despite scrupulously following the instructions and WordPress filter logic, succeeded in creating an effective exception. The trp-ajax.php file continued to be blocked, and the AH01630 errors persisted whenever the “Lock and Protect System Folders” protection was reactivated.

    Interactions with SiteGround’s AI Assistant: Seeking further assistance, I consulted SiteGround’s AI Assistant. The interactions can be summarized as follows:

    • Initial Report: I described the problem, the error, and the failure of whitelisting attempts using the sgs_whitelist_wp_content filter as per their guide, specifying the path formats already tested.
    • AI’s Responses: The AI Assistant repeatedly suggested the standard solutions already tried and communicated as ineffective:
      1. Using the sgs_whitelist_wp_content filter with only the base filename.
      2. Using the sgs_whitelist_wp_content filter with the full relative file path.
      3. Generic troubleshooting suggestions (clearing cache, testing in incognito, checking file permissions and .htaccess – the latter less relevant given the AH01630 error indicated a server/plugin configuration block, and the PHP filter was intended to manage that configuration).
    • Despite clarifying multiple times that these methods had already been applied unsuccessfully, the AI continued to propose them, entering a loop and eventually suggesting contact with human technical support.

    Conclusions and Concerns: The experience demonstrates that, at least in my scenario (which I believe to be common: a PHP file from a popular plugin located in a subfolder of wp-content/plugins/), SiteGround Security Optimizer’s custom filter system, particularly sgs_whitelist_wp_content, does not function as documented or as one would expect.

    This leads to an unpleasant choice for the user:

    • Disable a key security feature (“Lock and Protect System Folders”), potentially reducing the site’s protection level.
    • Accept the malfunctioning of legitimate and necessary plugins, with continuous errors in the logs.

    The official documentation on custom filters, regarding the sgs_whitelist_wp_content hook, appears to be oversimplified and does not provide clear or effective examples for files nested in subdirectories, which constitute the majority of plugin files. The AI Assistant, relying on such documentation, is unable to offer practical solutions for this problem.

    A review by SiteGround’s development team would be desirable, both of the sgs_whitelist_wp_content filter’s functionality to ensure it correctly handles full relative paths, and of the documentation to provide more accurate and applicable examples. Furthermore, a clear channel for reporting such product-related issues without the user being immediately directed to potentially paid support channels would be beneficial, especially when the problem seems to lie in a flaw or documentary shortcoming of the tool provided by the hosting itself.

    As it stands, for anyone using plugins with specific PHP files that are blocked by “Lock and Protect System Folders,” this aspect of the SiteGround Security Optimizer can be more of a hindrance than a help if one is unwilling to forgo that protection.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support Gergana Petrova

    (@gpetrova)

    Hello @seventhose ,

    I’m sorry to hear about the challenges you faced with the “Lock and Protect System Folders” feature and the difficulties in whitelisting the TranslatePress AJAX file. I appreciate your thorough investigation and efforts to resolve the issue using our documentation. Your insights are incredibly helpful in highlighting areas where we can improve.

    In a separate post, we offered a workaround to help balance security while allowing specific scripts to run. However, I have tested extensively on my end and confirmed that the exclusion works using just the file name itself, without the need for a full or relative path. For the filter to be detected, the “Lock and Protect System Folders” option must be turned off and then turned on again.

    Your feedback on the documentation has been passed on for review, and we’re looking into making these updates.

    I still encourage you to reach out to our support team with a regular support request and mention this thread, so we can have an additional look if needed.

    Thank you for your patience and understanding as we work to improve our plugin and support.

    Best Regards,
    Gergana Petrova

    Thread Starter Francesco

    (@seventhose)

    I can confirm that I turned off and on mutlple times with no positive effect.

    Thread Starter Francesco

    (@seventhose)

    Thank you for your reply and for acknowledging the detailed feedback regarding the “Lock and Protect System Folders” feature and the sgs_whitelist_wp_content filter. I appreciate that my insights are considered helpful for potential improvements.

    You mentioned that in your extensive testing, “the exclusion works using just the file name itself, without the need for a full or relative path,” and crucially, that “For the filter to be detected, the “Lock and Protect System Folders” option must be turned off and then turned on again.”

    I want to confirm that this exact scenario was indeed tested. As detailed in my previous communications and troubleshooting steps (both in my initial review and subsequent interactions), I did attempt to use just the filename (e.g., 'trp-ajax.php') within the sgs_whitelist_wp_content filter. While I cannot recall with 100% certainty if I toggled the “Lock and Protect System Folders” feature off and then on again specifically after every single variation of the PHP snippet, this on/off cycling of the main feature was performed multiple times during the extensive testing period, especially after implementing what seemed to be the most logical or documented solutions, in conjunction with thorough cache clearing.

    Despite these efforts, including the use of only the filename in the whitelist, the trp-ajax.php file belonging to TranslatePress continued to be blocked (resulting in Apache AH01630 errors) whenever “Lock and Protect System Folders” was active. This was the core of the frustration: the documented method, even in its simplest form as you’ve also found to work on your end, did not yield the expected whitelisting result on my specific production environment.

    I am glad to hear that feedback on the documentation has been passed on for review, as clearer examples for nested plugin files would certainly be beneficial.

    Regarding your encouragement to “reach out to our support team with a regular support request and mention this thread,” this is where a significant point of user friction arises. My experience, and that of others, is that the “Contact Us” pathways often lead into a frustrating loop. Typically, one is first directed to the AI Assistant, which, in this instance, repeatedly suggested the very solutions from the documentation that had already proven ineffective. If the AI cannot resolve the issue, the subsequent options often point towards pre-packaged knowledge base articles or direct the user to explore sections of the control panel, rather than providing a clear and straightforward way to submit a ticket to a human technical support agent for a plugin-specific problem like this – especially one that appears to be a bug, a documentation flaw, or an unexpected behavior of a SiteGround-provided tool. Often, the alternative presented for more direct human intervention for complex issues seems to steer towards prepaid support plans, which feels inappropriate when the core problem appears to stem from the provider’s own products or documentation not functioning as expected.

    The challenge is that there isn’t a discernible, free-of-charge channel to report what seems to be a product issue (a SiteGround plugin not behaving as per its own documentation) in a way that ensures it reaches a relevant development or plugin maintenance team, without it being treated as a standard end-user support request that might imply costs. For issues stemming from the functionality or documentation of a SiteGround product itself, one would hope for a direct feedback loop that doesn’t place the onus (or potential cost) of troubleshooting the provider’s tool back onto the customer.

    Thank you again for engaging with this feedback. I trust that highlighting these user experience aspects regarding both the plugin’s functionality and the support pathways can contribute to a better overall service.

    Plugin Support Gergana Petrova

    (@gpetrova)

    Thank you for the update, @seventhose.

    I’m sorry to hear that, despite your extensive testing and efforts, including toggling the feature and clearing caches, the solution did not work in your specific production environment.

    We would be more than happy to take a closer look at this on your behalf, but we kindly ask that you reach out to our support team directly.

    Please note that the Contact Us page in your SiteGround Client Area does offer different topics, including those specifically for issues related to WordPress or SiteGround’s tools. Selecting the appropriate topic can help direct your inquiry to the right team, ensuring a more efficient resolution process.

    If the exclusion filter is not working as expected, there might be an underlying issue or compatibility concern preventing the fix from applying properly. By reaching out, we can investigate further and provide the necessary support to resolve this.

    Best Regards,
    Gergana Petrova

    Hello i didnt want to open a new thread but i feel like i have a very similar issue.

    I’ve encountered some recurring issues with translations on my SupportCandy ticketing page and wanted to explain the troubleshooting steps I’ve taken so far.

    Initially, I experienced slow loading times for translations on the ticketing page. Disabling the “Lock and Protect System Folders” option in the SiteGround Optimizer plugin resolved this.

    However, I then ran into an error when trying to send a ticket in languages other than English. I’d receive a “Something Went Wrong” message, with the browser console displaying: wp-admin/admin-ajax.php (500). To address this, I enabled “Disable translation for gettext strings” in TranslatePress under Advanced > Debug, which resolved the ticket submission error.

    The current issue is that I’m unable to translate specific plugin texts, like this one from the User Registration plugin:

    “User registered. Wait until admin approves your registration.”

    I added this phrase’s translation in the gettext strings, but it doesn’t appear to work, likely due to the “Disable translation for gettext strings” option being enabled.

    It seems I may need to resolve the wp-admin/admin-ajax.php error first, but I’m unsure how to proceed. I’ve already tried deactivating all plugins and switching to the Twenty Twenty theme, but the error persists, and it’s only happening on the SupportCandy ticketing page.

    Thank you for taking the time to review my issue. I hope I’ve explained it clearly, and any guidance would be greatly appreciated.

    Best regards,
    John

    Plugin Support Svetoslav Vasev

    (@svetoslavvasev)

    Hello @giannisgx89 ,

    Thank you for the detailed information you provided. From what I understand, the issue you’re experiencing is related to the SupportCandy plugin and it occurs even with all other plugins disabled and while using a default theme. As such, the best course of action would be to reach out to this plugin’s support team, as they should be able to offer more insight into the matter.

    If the website in question is hosted at SiteGround, please feel free to open a support inquiry via our Help Desk so that we can take a look at the problem as well and offer further advice.

    Best Regards,
    Svetoslav Vasev

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