WordPress.org

Ready to get started?Download WordPress

Forums

wp-db-backup and safe_mode (2 posts)

  1. bergeroyshq
    Member
    Posted 7 years ago #

    Hi everybody,

    Is there a way to make wp-db-backup works in safe_mode ? On my host provider, the PHP script run under apache owner but the script was created under my own user. Results: the backup file cannot be created since the UIDs are different.

    Is there any work-arounds ?

    Thanks.

  2. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    The backup files are created in subdirectories off the wp-content directory. So that location needs to have the right permissions to allow the apache user to make a directory of its own there.

    Alternatively, if you read the wp-backup.php file's code, right at the top you can change the backup location to somewhere that you can write to. Look at this line:
    define('WP_BACKUP_DIR', 'wp-content/backup-' . $rand);

    That's telling it to use wp-content/backup-(randomnumber) as the place to save the backup. Change it to something that will work in your server config.

Topic Closed

This topic has been closed to new replies.

About this Topic