How to Manage WordPress Updates Without Losing Changes

WordPress updates help keep a website secure, compatible and reliable, but updating without preparation can overwrite custom code, affect theme modifications or cause plugins to stop working together. The safest approach is to back up your website, keep customisations separate from the original software, test significant changes where possible and check the website after updating.

Understand Which WordPress Changes Can Be Lost

Not every update puts your work at risk in the same way. The important distinction is between content stored in your database and modifications made directly to software files.

WordPress core updates

WordPress core updates replace or modify files that power the WordPress application. If you have edited core files directly, those changes can be overwritten during an update.

Avoid editing WordPress core files. Use supported WordPress features, plugins or a properly developed custom solution instead.

Your posts, pages, comments and many website settings are stored in the database, so a routine core update does not normally erase them. However, database changes made during an update can affect compatibility, and failures may leave the website needing recovery.

Theme updates

Theme updates can overwrite modifications made directly to the theme’s files, including its stylesheet, PHP templates and other code.

For example, if you add custom CSS to your theme’s style.css file and subsequently update that theme, the updated file may replace your changes.

The correct solution depends on where the customisation is stored:

  • Direct edits to theme files: move the modifications into an appropriate child theme or another supported customisation method.
  • Additional CSS: use the WordPress Additional CSS feature where available, or place the CSS in a child theme when appropriate.
  • Block theme customisations: changes saved through the Site Editor are generally stored separately from the theme’s original files, although theme updates can still affect how those changes appear.
  • Custom templates and functionality: use a child theme, custom plugin or another appropriate development approach.

The WordPress Developer Resources guide to child themes explains how they allow you to customise a parent theme without editing its original files.

Plugin updates

Plugin updates replace or modify files belonging to the plugin. Any changes you have made directly to those files may disappear.

For instance, editing a plugin’s PHP file to change its behaviour is not a reliable long-term solution. The developer may replace that file during the next update, removing your modification.

Where possible, implement additional functionality through documented hooks, filters, a separate custom plugin or another supported extension method. This keeps your code separate from the original plugin.

Content and settings

Ordinary WordPress content, such as published articles, pages and comments, is generally stored in the database rather than in the files replaced by routine software updates.

Nevertheless, an update can introduce changes to settings, database structures or application behaviour. A plugin may also migrate its data when activated or updated.

A complete backup is therefore essential even when you have not edited any code.

Back Up Your Website Before Updating

A current, restorable backup is your main protection against failed updates, compatibility problems and accidental data loss.

A complete WordPress backup has two essential components:

  • Website files: WordPress core files, themes, plugins, uploads and relevant configuration files.
  • Database: your posts, pages, comments, settings, users and other database-stored information.

Backing up only the files does not normally capture the database, and exporting only the database does not preserve your installed plugins, themes and uploaded files.

The official WordPress backup documentation explains these two components.

Create and verify a backup

Follow these steps before performing a significant update.

  1. Run a complete backup. Use your hosting provider’s backup facilities, a suitable backup plugin or another reliable backup process.
  2. Confirm that both components are included. Check that the backup contains the website files and database.
  3. Store a separate copy where practical. Keeping a backup away from the live website can help if the hosting account or server becomes inaccessible.
  4. Check the backup’s date and status. Make sure it completed successfully and represents the website as it currently exists.
  5. Understand the restoration process. Confirm how to restore the files and database, and whether your hosting provider can assist.
  6. Consider a restoration test. For important websites, verify that the backup can be restored to a staging environment rather than assuming that a completed backup is usable.

A backup is useful only if it can be restored. Do not rely on a backup that has failed, is incomplete or cannot be accessed when needed.

If your website receives frequent orders, bookings, registrations or other submissions, consider how much new data could be lost when restoring an older backup. Restoring a database snapshot may remove transactions or content created after that snapshot.

Use a Staging Website to Test Significant Updates

A staging website is a separate copy of your live website used to test changes before applying them to the production site.

It allows you to identify problems without immediately exposing visitors to a broken layout, failed checkout or incompatible plugin.

Staging is particularly useful when you run:

  • An online shop or membership website.
  • A business-critical website.
  • A website with several plugins that depend on one another.
  • A customised theme or bespoke functionality.
  • A website undergoing a major WordPress, theme or plugin upgrade.

How to test an update on staging

  1. Create a staging copy using your hosting provider or a suitable staging workflow.
  2. Confirm that the copy includes the relevant website files and database.
  3. Restrict access to the staging site where appropriate, especially if it contains personal or customer information.
  4. Apply the intended updates to the staging copy.
  5. Check the front end, WordPress dashboard and important website functions.
  6. Investigate any errors before updating the live site.
  7. Repeat the update on the live website once you are satisfied with the results, following your normal backup procedure.

Staging environments are not always identical to production. Differences in PHP versions, server configuration, scheduled tasks, payment integrations or external services can affect the results. Test the features that matter most rather than assuming a successful staging update guarantees a flawless live update.

Be careful when copying a staging database back to a live website. Doing so may overwrite newer posts, orders, comments, user accounts or other live data. A staging deployment should account for those differences rather than blindly replacing the production database.

Update WordPress Without Losing Custom Code

The most reliable way to preserve custom functionality is to keep your changes separate from the files managed by WordPress, your theme or a plugin.

Use a child theme for parent-theme modifications

A child theme inherits much of its appearance and functionality from a parent theme while allowing you to maintain your own modifications separately.

To use one safely:

  1. Check whether your current theme supports the child-theme approach and whether a child theme already exists.
  2. Create or configure the child theme using the appropriate WordPress development guidance.
  3. Move suitable custom CSS, template overrides and theme-specific modifications into the child theme.
  4. Test the result before updating the parent theme.
  5. Update the parent theme and verify that your customisations still behave as intended.

A child theme is not a universal solution for every change. It is primarily designed for theme customisations, and certain template overrides may require maintenance when the parent theme changes.

For more information, consult the official WordPress child theme guide.

Keep additional CSS separate

If you need to modify colours, spacing, typography or other visual properties, avoid editing the parent theme’s stylesheet directly.

For many classic themes, you can use the Additional CSS feature in the Customiser, where available. Block themes and some newer WordPress interfaces may provide different editing options.

Alternatively, a child theme can hold custom styles when that is more suitable.

Remember that Additional CSS is associated with the active theme. Switching themes may mean that the CSS no longer applies, even though the saved CSS itself has not necessarily been deleted.

See the official WordPress documentation on custom CSS for further guidance.

Keep plugin modifications outside plugin files

If a plugin lacks a particular feature, first check whether its developer provides a setting, extension point or documented method of customisation.

Where appropriate, place your additional functionality in a separate custom plugin or use supported hooks and filters. Avoid modifying the original plugin files, because a subsequent update can overwrite those edits.

If you have already made direct changes to a plugin, record what you changed before updating. You may need to compare the modified code with the new version and adapt your custom implementation.

Do not simply copy old modified files over the updated plugin. Doing so can reintroduce security vulnerabilities, remove bug fixes or create incompatibilities.

See also  How to Preview a WordPress Page Before Publishing

Manage Automatic Updates Carefully

WordPress supports automatic updates for core software and, where configured and supported, plugins and themes. Automatic updates can reduce maintenance work, but they do not eliminate the need for backups and monitoring.

Enable automatic updates selectively

In the WordPress dashboard:

  1. Go to Plugins → Installed Plugins.
  2. Find the plugin you want to manage.
  3. Use its automatic-update control, if available, to enable or disable automatic updates.

For themes, go to Appearance → Themes, open the relevant theme’s details and look for its automatic-update control where supported.

The exact interface and available options can vary by WordPress version, hosting environment and configuration. Some controls may be disabled or managed by a host or another component.

The official guide to plugin and theme automatic updates explains how these controls work.

Which updates should be automatic?

There is no single policy that suits every website. Consider the consequences of a failed update, the importance of security fixes and how quickly you can respond to a problem.

A sensible approach is to:

  • Keep WordPress core, plugins and themes maintained rather than leaving updates indefinitely.
  • Allow appropriate security and maintenance updates to be applied promptly.
  • Use staging and additional checks for major changes on business-critical websites.
  • Monitor update notifications and investigate failures.
  • Maintain a recent backup and a workable recovery process.

Disabling all updates indefinitely is not a good way to preserve customisations. It can leave known vulnerabilities and compatibility problems unresolved. Instead, separate custom code from the software being updated and establish a maintenance process appropriate to your website.

Follow a Safe WordPress Update Procedure

For routine maintenance, use a consistent process rather than installing every available update without checking its impact.

Before the update

  1. Review the available updates under Dashboard → Updates.
  2. Read the relevant release notes or changelog, especially for major changes.
  3. Create a current backup of the website files and database.
  4. Check that any custom code is stored separately from the files being updated.
  5. Test significant updates on staging where practical.
  6. Choose an appropriate time for the update, taking into account website activity and the availability of someone who can investigate problems.

During the update

  1. Update the selected components through the WordPress dashboard unless a different method is specifically required.
  2. Allow the update process to finish. Avoid repeatedly clicking update controls or interrupting the process unnecessarily.
  3. Read the completion messages and investigate any failures.
  4. If WordPress requests a database upgrade, follow the instructions displayed by WordPress.
  5. Avoid making unrelated changes while you are diagnosing an unsuccessful update.

The normal dashboard workflow is documented in the official WordPress Updates screen guide.

After the update

Check both the public website and the administrative interface.

  • Open important pages and confirm that their layouts display correctly.
  • Test navigation, forms, search and other essential features.
  • If you operate an online shop, check product pages, the basket and checkout using an appropriate test procedure.
  • Confirm that important plugin settings and theme customisations remain in place.
  • Check for PHP errors, failed requests or other warnings.
  • Review the WordPress dashboard for outstanding updates or error notices.
  • Clear relevant page, browser or content-delivery caches if old content continues to appear.

Do not assume that a successful update message proves that every feature still works. The update process may complete while a particular theme or plugin interaction remains broken.

Troubleshoot Problems After an Update

If the website behaves differently after an update, avoid making several unrelated changes at once. Identify the symptoms, preserve the current state and work through likely causes methodically.

Custom CSS or design changes have disappeared

Likely cause: the changes were stored directly in a theme file that was replaced during the update.

What to do: compare the current file with your previous version or backup. Recover the relevant customisations and move them to a more appropriate location, such as Additional CSS or a child theme. Test the result before making further changes.

A plugin no longer works

Likely cause: the updated plugin conflicts with another component, requires a different environment or contains a regression.

What to do:

  1. Record the error and identify which components were updated.
  2. Check the plugin developer’s documentation and support information for known compatibility issues.
  3. If possible, reproduce the problem on staging.
  4. Restore a compatible version or use a backup if the issue cannot be resolved promptly.
  5. Report the problem to the relevant developer with useful diagnostic details.
See also  How to Prepare WordPress for a New Website Administrator

Deactivate a plugin only when appropriate and with an understanding of its impact. Disabling a critical security, payment or membership plugin can introduce additional problems.

The website displays a critical error

If you cannot access the dashboard, consult the official WordPress common errors guide. Depending on the error, recovery may involve checking server logs, using WordPress recovery options, accessing files through your hosting control panel or asking your hosting provider for assistance.

Do not delete or replace random files in an attempt to restore access. If the cause is unclear, preserve a backup of the current state before making further changes.

The website remains in maintenance mode

WordPress normally uses a temporary maintenance file during certain updates. If the site remains unavailable with a maintenance message after the update has stopped, the process may not have removed that file.

The official WordPress common errors documentation explains how to investigate a stuck maintenance-mode message. Before removing files, confirm that no update is still running and that you are working in the correct WordPress installation.

Changes appear not to have taken effect

If the update succeeded but the site still displays old content, check the relevant caches and reload the page. A browser cache, page cache or content-delivery network can continue serving older files or pages.

Caching is only one possible cause. If clearing the relevant cache does not help, investigate whether the update actually changed the expected files, settings or behaviour.

Common Questions About WordPress Updates

Will updating WordPress delete my posts and pages?

Routine updates do not normally delete posts and pages because WordPress stores this content in the database. However, failed updates, database problems or incompatible code can affect a website. Maintain a complete backup before updating.

Will a theme update remove my custom CSS?

It may do so if the CSS was added directly to a theme file that the update replaces. CSS stored through the appropriate Additional CSS interface or in a child theme is generally better protected from parent-theme file replacement.

Can I update WordPress without updating my plugins?

Yes. WordPress core, themes and plugins can generally be updated separately through the dashboard. However, compatibility requirements vary, so check relevant release notes and avoid leaving components outdated indefinitely.

Should I disable automatic updates to protect my changes?

Not simply for that reason. Direct modifications to WordPress, theme or plugin files should be moved to an appropriate customisation method. Automatic updates can help maintain security, provided you have backups and a suitable way to monitor and recover from failures.

Can I undo a WordPress update?

Often, but the safest method depends on what changed and whether the update altered the database. Restoring a complete pre-update backup can recover the previous files and database, but it may also discard content created afterwards. Rolling back only a plugin or theme can be possible in some cases, although compatibility and database changes must be considered.

Conclusion

Managing WordPress updates safely starts with separating customisations from the original software and maintaining a complete, restorable backup. Use child themes or other supported methods for custom code, test significant changes on staging where practical, and check essential website functions after updating.

Updates are an important part of keeping WordPress secure and reliable. A consistent process makes it easier to apply them promptly without unnecessarily risking your website’s content, design or functionality.

Scroll to Top