• Resolved kwdavids

    (@kwdavids)


    I host my WordPress site at DreamHost.com. That provider has “users” under its accounts and individual sites run sites under these users. The user determines the system user that owns the files and the location of the files within the account’s file structure.

    I found it necessary to move a few sites from one user to another. The process is simple–assign a new user for the domain and check the box that says to move the files. The database remained unchanged. When I moved the site it totally crashed with some sort of error regarding permissions. Fortunately I had PHP set to show error messages (yes I know that’s bad) or I never would have figured out what happened.

    What happened was that a file called user.ini had been created that loaded wordfence-waf.php. Both of those files had hard-coded directory paths, and the paths were pointing to the old user directory (which the new user didn’t have permission to). Nothing else in WordPress failed because of the move, only WordFence.

    I had to move another site, so I thought I would be clever. I de-activated WordFence, moved the site, then re-activated it. That crashed the site too, it was several minutes after editing the files that the site actually started working again.

    Third time is the charm. I disabled WordFence, moved the site, edited the files, then re-activated WordFence. It worked after that.

    I’m no PHP writer, but I believe that the directory is available to a php program and it needn’t be hardwired in code. I don’t know if user.ini really has to have the directory hardwired or not.

    • This topic was modified 6 years, 7 months ago by kwdavids.
    • This topic was modified 6 years, 7 months ago by kwdavids.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi,
    The line in “user.ini” file loads wordfence-waf.php before anything else on your website and it must be called in such a way that allows the firewall to be loaded before executing codes on your site.

    We recommend disabling the firewall before migrating your website, that should prevent such an issue.

    Thanks.

    Thread Starter kwdavids

    (@kwdavids)

    Disabling the firewall doesn’t work.

    I tried that. I disabled the firewall and then moved the files. The site worked. Then I activated WordFence and it crashed.

    When I migrated sites with a migration tool it was OK, I presume because the tool didn’t copy .htaccess. I had to go through the process of reinitializing WordFence and it wrote the new .htaccess file.

    In the failing case, the site was copied by the host to a new directory, including user.ini and .htaccess.

    Perhaps the solution is for WordFence to re-do those configuration files every time it is activated, not just when .htaccess lacks the WordFence section.

    Hmm… are you sure you followed the procedures mentioned in the docs when disabling the firewall, especially the “Remove Extended Protection” step?

    Thanks.

    Thread Starter kwdavids

    (@kwdavids)

    No, when I moved, I just de-activated the plug-in. I had no idea that something else was needed.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Site fails after move’ is closed to new replies.