Skip to content

Fix for WPAU failed at step 2 error

I recently got an error using (otherwise excellent) WP plugin WordPress Automatic Upgrade:

“Database files could not be backed up. Failed at Step 2.”

Luckily, there was a fix.

Apparently this was because of PHP safe mode. Replacing line 517:

exec("chmod 755 $archiveName");

with this

  if( ini_get('safe_mode') ){
  // Do it the safe mode way
  exec("chmod 755 $archiveName");
  // Do it the regular way
  chmod($archiveName, 0755);


did the trick.