• Hello,

    Does WPMigrate need write access for temporary files in uploads even when using it in CLI mode ?

    The user running wp migrate has no write access to wp-content/uploads but that shouldn’t be a problem since the output file is in his home.

    WP core version: 5.7.2
    WP Migrate DB version: 2.0

    $ wp migratedb export /home/user/tmp/export.sql --find=//example.com,/var/www/example.com/www --replace=//example.localhost,/var/www/html --skip-replace-guids --gzip-file
    Initiating migration...
    Error: Export Failed — We can't save your export to the following folder:
    /var/www/example.com/www/wp-content/uploads/wp-migrate-dbPlease adjust the permissions on this folder. See our documentation for more information ?

    Edit: seems the answer is yes ^^.

    Suggestion: use /tmp or wp-content/upgrade ?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Delicious Brains

    (@deliciousbrains)

    Yep, the user running wp migrate will need write access to the wp-content/uploads directory, even if specifying a custom path to the export file. We store the export in the wp-content/uploads/wp-migrate-db path while we are processing it initially.

    Thread Starter jhnchristopher

    (@jhnchristopher)

    Thanks for confirming.

    I ended up sudoing to www-data like this:

    
    sudo -u www-data wp migratedb export /home/user/tmp/export.sql --find=//example.com,/var/www/example.com/www --replace=//example.localhost,/var/www/html --skip-replace-guids --gzip-file
    

    Now of course /home/user/tmp needs to be writable by www-data

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘wp migratedb export ignores output-file path ?’ is closed to new replies.