• Resolved Duvenhage

    (@duvenhage)


    Hello

    First of all, thanks for developing such an awesome plugin. It really saves us all the time to copy an entire website from one place to another.

    Moving to the problem, I’m experiencing some difficulties sometimes using the plugin. I searched through other topics to avoid posting a topic which is already known and solved. But none, as far as I searched and read, helped.

    I’m running quite a number of websites in sub-folders of my domain. For some of those websites I tried using the plugin. Half of those sites I used the plugin on, were duplicated with no problem. But for the other half I kept receiving the following error after deployment was finished on the target site and when trying to view the site:
    “Call to undefined function wp() …”

    I checked the generated wp-config file and it was empty (this was mentioned on some other topics I know)

    But the thing is that, this happens only to some of my websites, not all. I manage to solve it manually each time by copying the codes from a raw wp-config-sample file, pasting them into wp-config file and replacing the default values with my database information.

    Normally each time I download the created package from the 1st site, I delete the wp-config file (since I get an error at the first stage of deployment if I leave that file there). Sometimes I copy & paste a raw wp-config-sample file in the package (don’t know if that really makes a difference)

    Good to mention that, when scanning in the first place, I get the warning about open_basedir. I’m using a shared hosting plan, and can’t do anything about that since the hosting dudes won’t change that for one single guy.

    So the question is, why the wp-config file is generated with all required codes and information on some of the sites, while on some other it’s empty?
    (all sites share the same hosting plan)

    https://www.ads-software.com/plugins/duplicator/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter Duvenhage

    (@duvenhage)

    Hello again.

    A Question here. I used to add the installer.php file to the archive.zip and extract them altogether on my host. So that after extraction, on my root directory I had all site files, plus the installer.php file., then I would run the installation.

    Does it have any difference comparing to the other method where you put installer.php file outside the archive.zip file and along with it (without extracting the zip file) in the desired directory?

    Does the wp-config file being empty, have anything to do with “how” you do it?

    Hey Duvenhage,

    The installer file automatically comes bundled inside the package with a name installer-backup.php. This is just incase users lose the original installer. It sounds like the empty wp-config.php file issue has something to do with permissions somewhere. Have you checked to make sure the permissions and the owners of the directories are the same for the ones that work and don’t work?

    Hope that helps!

    Thread Starter Duvenhage

    (@duvenhage)

    Hello Cory and thanks for the response,

    And yes, as I mentioned earlier in the first post, all that happens on same location, and also on my localhost. Permissions are fine, everything else is identical for all projects, it just happens.

    To add a bit more detail here, I once tried installing a package twice with an interval of few days on the same location. First time it worked perfectly well, and the second time it ended creating the blank wp-config.

    It might also be helpful (or totally irrelevant) to add that, I came up with the idea of comparing my packages with another package that was created by a friend of mine, which was working just fine.

    The only difference was that his package had also the htaccess file and mine didn’t. I usually delete htaccess, error logs and wp-config after the package is created.

    I’m not really sure to be honest the issue seems to be very odd… It works one time and then later it doesn’t seems to be environment related. Did you happen to see any errors generate by Apache or in the PHP error log?

    Thread Starter Duvenhage

    (@duvenhage)

    Well to be honest I never checked those logs, only the installer log I checked, and didn’t see much there.

    I can try installing a package again and check all logs, see if there’s something in there.

    One other option is to try and configure openbase_dir here is a thread with some samples, not really sure or not if that will help…

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘wp-config, sometimes ok, sometimes not’ is closed to new replies.