Troubleshooting the UpdraftPlus 'Extra Whitespace' Warning
Content
If you're using the UpdraftPlus plugin for your WordPress backups, you may have encountered a warning message in your dashboard stating: "Warning: Your WordPress installation has a problem with outputting extra whitespace. This can corrupt backups that you download from here."
This is a common issue reported by users, and while it can be frustrating, it's usually solvable. This guide will explain what causes this warning and walk you through the most effective steps to resolve it.
What Does This Warning Mean?
This warning appears when UpdraftPlus detects that your WordPress site is outputting unwanted blank spaces or characters ("whitespace") before or after the main content of your web pages. This whitespace is problematic because it can become embedded in backup files you download directly from the UpdraftPlus admin interface, potentially corrupting them and making restoration difficult.
It's important to note that this issue does not affect the integrity of the backups stored on your remote storage (like Google Drive or Amazon S3). The primary risk is with downloads initiated from your WordPress dashboard.
Why Does This Happen?
Extra whitespace is almost always caused by an error in a PHP file. A very common source is a file, often your theme's functions.php or a plugin file, that has a blank line—or, more critically, a closing PHP tag (?>)—followed by a line break or space after it. This extra data after the closing tag gets sent to the browser as output.
Based on community reports, this issue has been linked to various sources, including other plugins like WooCommerce, custom code under development, or even the site's wp-config.php file.
How to Find and Fix the Extra Whitespace
Follow these steps to identify and eliminate the source of the extra whitespace.
- Deactivate All Other Plugins
Go to your WordPress admin panel and navigate to Plugins > Installed Plugins. Deactivate every plugin except for UpdraftPlus. After doing this, check if the warning message disappears. If it does, you know the issue is with one of the deactivated plugins. - Reactivate Plugins One by One
Reactivate your plugins one at a time, checking the UpdraftPlus settings page after activating each one. When the warning reappears, you have found the conflicting plugin. You can then contact that plugin's support team for assistance or look for an update that might resolve the issue. - Switch to a Default Theme
If deactivating plugins doesn't resolve the issue, the problem might be in your theme. Temporarily switch to a default WordPress theme like Twenty Twenty-Four. If the warning goes away, the issue lies in your main theme's code. - Check Key Files Manually
If the above steps don't pinpoint the issue, you may need to inspect key files. Using an FTP client or your hosting provider's file manager, check the following:- wp-config.php: This file should end with the line
require_once ABSPATH . 'wp-settings.php';and nothing after it. Ensure there are no blank lines or spaces after this line. - Theme's functions.php: Open your active theme's
functions.phpfile. Ensure there is no closing?>tag at the end of the file. It is a WordPress best practice to omit the closing PHP tag in this file to prevent exactly this issue. If the tag is present, remove it and any blank lines that follow.
- wp-config.php: This file should end with the line
- Check for Plugin-Specific Code
If you are a plugin developer experiencing this warning during development, the same principle applies. Scour your plugin's PHP files for trailing whitespace or unnecessary closing?>tags after the final line of code.
By systematically following this process, you can identify the source of the extra whitespace and eliminate the warning, ensuring your downloadable backups remain clean and functional.
Related Support Threads Support
-
UpdraftPlus doesn’t remove plugins after restoration.https://wordpress.org/support/topic/updraftplus-doesnt-remove-plugins-after-restoration/
-
Some questionshttps://wordpress.org/support/topic/some-questions-124/
-
No host backups anymorehttps://wordpress.org/support/topic/no-host-backups-anymore/
-
Backups in Dashboard not showing all backups there like Uploads, Otherhttps://wordpress.org/support/topic/backups-in-dashboard-not-showing-all-backups-there-like-uploads-other/
-
Plugin uses site language, not user/admin languagehttps://wordpress.org/support/topic/plugin-uses-site-language-not-user-admin-language/
-
PHP “Deprecated” notice on PHP8.3https://wordpress.org/support/topic/php-deprecated-notice-on-php8-3/
-
when i login to updraft plus it ask me otphttps://wordpress.org/support/topic/when-i-login-to-updraft-plus-it-ask-me-otp/
-
Transferring the backup folder to Google Drivehttps://wordpress.org/support/topic/transferring-the-backup-folder-to-google-drive/
-
uploads backup files are 25MB in size on one site, and 250MB on anotherhttps://wordpress.org/support/topic/uploads-backup-files-are-25mb-in-size-on-one-site-and-250mb-on-another/
-
Does UpdraftPlus affect the available memory on the site?https://wordpress.org/support/topic/does-updraftplus-affect-the-available-memory-on-the-site/
-
Plugin schedule issuehttps://wordpress.org/support/topic/plugin-schedule-issue/
-
Extra White Space Warning – UpdraftPlushttps://wordpress.org/support/topic/extra-white-space-warning-updraftplus/
-
Allow user roles for individual pluginshttps://wordpress.org/support/topic/allow-user-roles-for-individual-plugins/
-
Working with Nginx siteshttps://wordpress.org/support/topic/working-with-nginx-sites/
-
Another folder for the backup!!https://wordpress.org/support/topic/another-folder-for-the-backup/
-
The option to send email to admin doesn’t stay checked in setuphttps://wordpress.org/support/topic/the-option-to-send-email-to-admin-doesnt-stay-checked-in-setup/
-
Dismissed admin notices keep coming back immediatelyhttps://wordpress.org/support/topic/dismissed-admin-notices-keep-coming-back-immediately/
-
Feature request offload media filehttps://wordpress.org/support/topic/feature-request-offload-media-file/
-
site down after deactivating updraftplus freehttps://wordpress.org/support/topic/site-down-after-deactivating-updraftplus-free/
-
Plugin I created causes ‘extra white space’ error messagehttps://wordpress.org/support/topic/plugin-i-created-causes-extra-white-space-error-message/
-
Warning oldpugins after doing a Restorehttps://wordpress.org/support/topic/warning-oldpugins-after-doing-a-restore/
-
Do not change Media URLshttps://wordpress.org/support/topic/do-not-change-media-urls/
-
“WordPress installation has a problem with outputting extra whitespace.”https://wordpress.org/support/topic/wordpress-installation-has-a-problem-with-outputting-extra-whitespace/
-
Why Does My UpdraftPlus Plugin Keep Disappearing?https://wordpress.org/support/topic/why-does-my-updraftplus-plugin-keep-disappearing/
-
Change email notification addresshttps://wordpress.org/support/topic/change-email-notification-address-3/
-
Deactivating UpdraftPlus Shuts Site Down!https://wordpress.org/support/topic/deactivating-updraftplus-shuts-site-down/
-
Updraftplus causing conflict / crashing sitehttps://wordpress.org/support/topic/updraftplus-causing-conflict-crashing-site/
-
Connecting this account to installed pluginhttps://wordpress.org/support/topic/connecting-this-account-to-installed-plugin/
-
Google Drive custom folderhttps://wordpress.org/support/topic/google-drive-custom-folder/
-
UpdraftPlus – impossible de se connecterhttps://wordpress.org/support/topic/updraftplus-impossible-de-se-connecter/
-
problems with extra white spacehttps://wordpress.org/support/topic/problems-with-extra-white-space-4/
-
Excluding tables from backup using code snippet – parametershttps://wordpress.org/support/topic/excluding-tables-from-backup-using-code-snippet-parameters/
-
WooCommerce causing Whitespace warning in Updraft Plushttps://wordpress.org/support/topic/woocommerce-causing-whitespace-warning-in-updraft-plus/
-
PHP Version Support?https://wordpress.org/support/topic/php-version-support-8/
-
Show current time zonehttps://wordpress.org/support/topic/show-current-time-zone/
-
php errors found in Updraft Plus on compatibility checkhttps://wordpress.org/support/topic/php-errors-found-in-updraft-plus-on-compatibility-check/
-
Google Drive consent / authorizationhttps://wordpress.org/support/topic/google-drive-consent-authorization/
-
Backup to dropbox to do not workhttps://wordpress.org/support/topic/backup-to-dropbox-to-do-not-work/
-
bkp folders in Google Drivehttps://wordpress.org/support/topic/bkp-folders-in-google-drive/
-
How easy is it to restore a full backup with all files?https://wordpress.org/support/topic/how-easy-is-it-to-restore-a-full-backup-with-all-files/
-
Does your plugin download ALL files of wordpress & database?https://wordpress.org/support/topic/does-your-plugin-download-all-files-of-wordpress-database/
-
Daily over 100 saves on Google Drivehttps://wordpress.org/support/topic/daily-over-100-saves-on-google-drive/