• Resolved Tereza17

    (@tereza17)


    Hi
    I had set up a staging site with Wordfence and everything was working well.

    I have now deployed the staging site to live and Wordfence is asking me to configure the Firewall – but it says …’This PHP setting is currently in use, and is including this file:

    /home/customer/www.staging5.name of site.com/public_html/wordfence-waf.php

    How do I change this file name to reflect the live site as I am no longer using the staging site.

    thanks

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Support wfpeter

    (@wfpeter)

    Hi @tereza17, thanks for your question.

    This is quite a common occurrence when moving from staging to live as the auto_prepend_file value that you highlight above still points to the location of wordfence-waf.php on the staging site’s filesystem.

    You can find this value specified in .htaccess and/or .user.ini in the root of your website that you can access via FTP or your host’s control panel/file manager. auto_prepend_file = simply needs changing to live/site/path/to/wordfence-waf.php – naturally with your real path rather than this placeholder. You can discover the path in Wordfence > Tools > Diagnostics > WordPress Settings > ABSPATH on the live site if you’re uncertain.

    Thanks,

    Peter.

    Thread Starter Tereza17

    (@tereza17)

    Hi @wfpeter
    Thanks for your reply.

    I had already tried deleting Wordfence from the staging site and from the live and then reinstalling the live Wordfence plugin.

    Following your instructions, I have checked the WordPress Settings > ABSPATH and this is displaying the correct live site.

    However, when I click on the ‘To make your site as secure as possible to optimize the Wordfence Web Application Firewall – click here to configure’ message at the top of the Wordfence Dashboard.

    The path displayed is still showing the staging site and not the live site.

    So do I still need to try and change the php settings? I have found the File Manager (the site is hosted by Siteground who do not have a cpanel)but I do not see ‘auto_prepend_file’ – what path would I need to find it?

    Thanks

    Tereza

    Plugin Support wfpeter

    (@wfpeter)

    Hi @tereza17, thanks for your reply.

    You will need to find the .htaccess and .user.ini files in the WordPress root of your site. The root will usually be something like /home/website/public_html. They have a dot at the start of the filename so sometimes you’ll need to show hidden files for them to be visible.

    When editing these files you will see auto_prepend file = /path/to/staging_site/wordfence-waf.php, perhaps more than once, which will need replacing with the ABSPATH of your live site. Don’t forget to leave wordfence-waf.php on the end!

    Thanks again,

    Peter.

    Thread Starter Tereza17

    (@tereza17)

    Hi @wfpeter
    OK (so very scary not having done anything like this before), I found:
    – .htaccess – but there wasn’t anything in there that had the staging or wordfence reference
    – user.ini – that had auto_prepend_file= which included the staging reference, which I removed but left the rest of the path as it was
    – wordfence-waf.php – which had 3 paths and I removed the staging reference from each one and again left everything else

    However, when I click to configure the firewall back in the Wordfence dashboard it is still pointing to the staging site.

    Do I have to change it anywhere else?

    Very scary changing this kind of stuff when you haven’t done anything like this before!

    Thanks for all your help, much appreciated.

    Cheers,

    Tereza

    Thread Starter Tereza17

    (@tereza17)

    Hi @wfpeter
    Are you able to help any further with this?
    I also did a search for ‘staging’ in public_html and it came back with no results but is still pointing to the staging site (although the ABSPATH address is correct), so still cannot correctly configure the firewall.

    As the site is now live, I have deactivated Wordfence for the moment and used another free plugin (which I have to say is not as good), but I don’t want the site to be unprotected while I am trying to sort this out. I have also turned off google search engines for the moment.

    As I am just starting out, I don’t want to upgrade to premium at this point but will do once I am up and running, assuming I can get this to work.

    I also joined the Wordfence webinar on this, but they just said to ask for help, so didn’t get a technical solution!

    Cheers,
    Tereza

    • This reply was modified 3 years, 11 months ago by Tereza17.
    Plugin Support wfpeter

    (@wfpeter)

    Hi @tereza17, thanks again for getting in touch.

    I’m sorry to see you had problems modifying this, unfortunately as part of our free support service we cannot request user credentials or other access to help directly. I’d like to see you get up and running with Wordfence again if possible, so could you re-enable it briefly whilst logged in as an admin and send me a diagnostic report? I should be able to see paths you have specified there and see where things have gone wrong.

    Can you send the diagnostic report to wftest @ wordfence . com? You can find the link to do so at the top of the Wordfence Tools > Diagnostics page. Then click on “Send Report by Email”. Please add your forum username where indicated and respond here after you have sent it.

    Note: For the fastest response time, please make sure and add any information or questions directly to this topic and not the email address above unless asked.

    Thanks,

    Peter.

    Thread Starter Tereza17

    (@tereza17)

    Hi @wfpeter
    Thank you for coming back to me. I have reinstalled and sent you the diagnostics page as requested.
    I do appreciate that your support is limited with regard to free support and I am sure that I will upgrade to the premium version at some point, it is just expensive when I am just starting out :>).
    Cheers,

    Tereza

    Plugin Support wfpeter

    (@wfpeter)

    Hi @tereza17, I received your diagnostic so thank-you for that.

    As I suspected, the auto_prepend_file value on the site is still pointing to staging whereas the ABSPATH of your new site indicates the new site location.

    It currently is set to:

    /home/customer/www/staging5.xxxxxxxxxx.com/public_html/wordfence-waf.php

    If the instructions above don’t work for you, I would recommend speaking with your host to see if they can use your php.ini, .htaccess or .user.ini align with this path:

    auto_prepend_file = /home/customer/www/xxxxxxxxxx.com/public_html/

    Naturally replace the x characters with the domain of your site which I’ve removed here for security.

    Thanks,

    Peter.

    Thread Starter Tereza17

    (@tereza17)

    Hi @wfpeter
    All sorted! Thank you so much for your help. I managed to change the path which was incorrect and all sorted.
    I really appreciate your time and patience around this.
    Cheers,
    Tereza

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Deployment of staging site’ is closed to new replies.