I use the WordPress to Dropbox backup plugin on many of my WordPress installs and, up until I changed the setup to use PHP7, things were working great.

Thanks to the post from smowton over on the wordpress.org support channel, it is now working again.

The backup plugin was throwing errors in the logs about curl and an unexpected “overwrite” parameter. E.g.
Warning: curl_setopt_array(): Disabling safe uploads is no longer supported in /srv/users/mjburton/apps/mjburton/public/wp-content/plugins/wordpress-backup-to-dropbox/Dropbox/Dropbox/OAuth/Consumer/Curl.php on line 92

The fix is as follows:

All paths are relative to $YOUR_SITE_DIRECTORY/wp-content/plugins/wordpress-backup-to-dropbox.

In file Dropbox/Dropbox/OAuth/Consumer/Curl.php:
comment out the line:
$options[CURLOPT_SAFE_UPLOAD] = false;
(this option is no longer valid in PHP 7)

In file Dropbox/Dropbox/OAuth/Consumer/ConsumerAbstract.php: replace the test if (isset($value[0]) && $value[0] === '@') with if ($value instanceof CURLFile)

In file Dropbox/Dropbox/API.php: replace 'file' => '@' . str_replace('\\', '/', $file) . ';filename=' . $filename with 'file' => new CURLFile(str_replace('\\', '/', $file), "application/octet-stream", $filename)

This replaces the long-deprecated, now-disabled support for uploading files with “@/file/to/upload” with the replacement “CURLFile” class. Also a note to the author (and optional patch for the reader): check the return value for curl_setopt_array, as this was failing unnoticed, leading to confusing behaviour downstream.

I was going round in circles trying to get WordPress permalinks to work on a Ubuntu server with Apache2 installed.

The .htaccess file was fine:

# BEGIN WordPress
#
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
#

# END WordPress

However I still got Error 404 page not found when I went to siteurl.com/page-name rather than siteurl.com/?p=123

In the end it turns out I needed to make a tweak to the Apache virtualhost.conf file for the site in question:

By default in the section it had

AllowOverride None

This needed to be changed to

AllowOverride All

A quick

service apache2 reload

And, hey presto, permalinks were working again.

Aside from my belt-and-braces approach of Raid-5 storage, and regular backups to a separate drive, I wanted to make sure my numerous websites and blogs were also backed up off-site.

For WordPress blogs I have installed the following Plugin:

WordPress Backup to Dropbox

It’s been running a month or so now and appears to work well.  I have it backing up regularly and will purchase more Dropbox storage if required in the future.  You may even be able to do this with Google Drive in the future if you can get more free space there.

There are some premium features which may save you some space and money in the long run: Zipping up backups before uploading in particular.

This problem keeps hitting me each time I install a fresh wordpress blog.

Not Found

The requested URL /home-network/ was not found on this server.

Every time I have to re-google until I find the solution.

For reference, I’m running Apache2 on an Ubuntu machine.

The content appears correct in the .htaccess file within the base directory:

<IfModule mod_rewrite.c>
RewriteEngine On RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ /index.php/$1 [L,QSA]
</IfModule>

The issue falls within /etc/apache2/sites-available/nameoffile.conf

The following must be modified:

AllowOverride None

to

AllowOverride All

You will probably only run into this if you’re a systems administrator, or if your web-host has not set this up correctly.  Changing the wording and issuing:

service apache2 reload

Did the trick for me.  If it didn’t, you wouldn’t see this page.