Kloudstack Logo

Understanding WordPress Auto-Updates

To auto-update or not?

Within WordPress, there are several built-in options for auto-updates. Let’s review them.

The WordPress core is one of the most important auto-update features. Why, you ask? Because 9 out of 10 times, updates contain security patches, which are crucial for keeping your WordPress site secure and up to date.

WordPress Core

What if I have a Custom Theme?

The WordPress core should not be customized. If you or your developer has made custom updates to the core, it could break your site when future updates are released. We recommend making custom changes within your theme so they are isolated from the core code.

How to Enable or Disable Auto-Updates:

  1. Go to Updates, located in the side menu under Home.
  2. You will also see updates for plugins and themes listed here.

Important Note: If you are hosting your WordPress site with KloudStack, automated updates are turned on by default.

WordPress Auto-Updates

Screenshot – WordPress Auto-Updates Core, Plugins & Themes


What If WordPress Auto-Updates Breaks My Site?

If an update breaks your site, don’t worry! It’s likely related to a plugin, theme, or the PHP version. Here’s a quick troubleshooting guide:

  1. Check the Current PHP Version: It’s recommended to run the latest version (currently 8.3).
  2. Deactivate Plugins: Deactivate your plugins one by one from Plugins > Installed Plugins to see if that resolves the issue.
  3. Disable Plugins via SFTP: You can also turn off plugins manually via SFTP using a client like FileZilla, or via your custom hosting portal.
  4. Enable Debugging: If debugging is not already turned on, enable it to identify the root cause of the issue.

How to Rollback or Downgrade a WordPress Auto-Updates?

We do not recommend downgrading WordPress unless it’s absolutely necessary and temporary.

Important: Always back up your site before downgrading.

Manual Rollback:

  1. Download the version you need from the WordPress Release Archive.
  2. SFTP to your server and overwrite the current version in the wp-admin and wp-includes directories. Be careful not to override wp-content, as this contains your uploads, themes, and plugins.
  3. Once uploaded, log into your site at /wp-admin. You may be prompted to update the database – click Update WordPress Database if this appears. {add screenshot here}
  4. After logging in, check the dashboard to ensure the version you uploaded is now active.
  5. If you deactivated any plugins, reactivate them one by one and test your site.

Plugin Option for Downgrading WordPress:
You can also use the WP Downgrade plugin, which has over 60,000 downloads, to easily switch to an earlier version of WordPress.

Rolling Back Themes

WordPress offers over 12,000 themes in the WordPress.org directory. There are also default themes that come preloaded with every WordPress installation (e.g., Twenty Twenty-Four, Twenty Twenty-Three, etc.). Additionally, you can upload custom themes or use themes from third-party developers.

Can I Roll Back a Theme Version?

Yes, with the WP Rollback plugin, rolling back a theme is simple:

  1. Go to Appearance > Themes.
  2. Select the theme you want to roll back and click Rollback.
  3. Follow the steps to complete the rollback.

You can review which version to rollback to.

Click on the Rollback button, to start the rollback process.

The following screenshot show that the rollback was successfully installed.

Ref LinksTwenty Twenty-Three | WordPress Theme | WordPress.org

– Revision 244078: /twentytwentythree (wordpress.org)

twentytwentythree (log) – WordPress Themes

There is a GitHub Repo but it’s no longer managed and has been moved into the main WordPress core – The Code Repository (SVN)
https://github.com/WordPress/twentytwentythree

Plugin Auto-Updates & Rollbacks

As of WordPress 6.6, auto-rollbacks are now available for plugins. If a plugin update fails, WordPress will automatically roll back to the previous version and send a notification to the site’s admin email.

To enable or disable plugin auto-updates, navigate to Plugins > Installed Plugins. From there, you can toggle auto-updates on or off.

How to Manually Update a Plugin:

  1. Go to Installed Plugins and click View Details for the plugin you want to update.
  2. For plugins like W3 Total Cache, you can access the Advanced View and select a version to download.
  3. Upload the downloaded zip file to your WordPress site by clicking Upload Plugin at the top of the Installed Plugins page.

Patterns

Currently, patterns do not have auto-updates. If you’re using a default theme (e.g., Twenty Twenty-Five), patterns are updated alongside the theme. To review and install patterns, visit WordPress.org/patterns, where over 1,966 patterns are available for download.

Adding the Copy Pattern into WordPress

There are two ways you can add the copy pattern:

  1. Copy the Pattern HTML into Your WordPress Site
  2. Import the Pattern as a JSON File

Ref – Fullwidth Dark Banner with Heading Top Left – Block Pattern – WordPress.org

HTML
<!-- wp:cover {"url":"https://pd.w.org/2022/07/87262c92d42acd1c3.73206444.jpg","id":333,"dimRatio":90,"customOverlayColor":"#141414","focalPoint":{"x":0.5,"y":0},"minHeight":50,"minHeightUnit":"vh","contentPosition":"top left","align":"full","style":{"spacing":{"padding":{"top":"5vw","right":"5vw","bottom":"5vw","left":"5vw"},"margin":{"top":"0"}}}} -->
<div class="wp-block-cover alignfull has-custom-content-position is-position-top-left" style="margin-top:0;padding-top:5vw;padding-right:5vw;padding-bottom:5vw;padding-left:5vw;min-height:50vh"><span aria-hidden="true" class="wp-block-cover__background has-background-dim-90 has-background-dim" style="background-color:#141414"></span><img class="wp-block-cover__image-background wp-image-333" alt="" src="https://pd.w.org/2022/07/87262c92d42acd1c3.73206444.jpg" style="object-position:50% 0%" data-object-fit="cover" data-object-position="50% 0%" /><div class="wp-block-cover__inner-container"><!-- wp:group {"style":{"spacing":{"blockGap":"0px"},"layout":{"selfStretch":"fill","flexSize":null}},"layout":{"type":"flex","orientation":"vertical","flexWrap":"nowrap"}} -->
<div class="wp-block-group"><!-- wp:paragraph {"align":"left","style":{"typography":{"fontSize":"160px","fontStyle":"italic","fontWeight":"900","lineHeight":"0.8","letterSpacing":"-4px","textTransform":"none"},"color":{"text":"#d8a557"}},"fontFamily":"source-serif-pro"} -->
<p class="has-text-align-left has-text-color has-source-serif-pro-font-family" style="color:#d8a557;font-size:160px;font-style:italic;font-weight:900;letter-spacing:-4px;line-height:0.8;text-transform:none">bud!</p>
<!-- /wp:paragraph --></div>
<!-- /wp:group --></div></div>
<!-- /wp:cover -->

Method 1: Copy the Pattern HTML

The simplest way is to copy the HTML code into your WordPress site:

  1. Once logged in, click on Appearance and then Editor within the menu.
  2. Click on Patterns; this will display all the current patterns.
  3. Click on Add New Pattern.
  4. Add a name and category, and select whether the pattern should be Synced or not.
  5. You will then be taken to a new block canvas. Go to the top right and click Code Editor.
  6. Paste the HTML into the “Start writing with text or HTML” field.
  7. Click Exit Code Editor to review the pattern.
  8. Click Save to save the pattern.
  9. Go back to Patterns and search for the saved pattern.
  10. The pattern is now ready for you to use within your WordPress site.

Method 2: Importing by the Saved JSON File

If you want to import a pattern using a saved JSON file, follow these steps:

  1. First, save the pattern in HTML format.
  2. Convert the HTML to a JSON file. To do this:
    • Open VS Code (or any text editor) and paste the HTML content into a new file.
    • Save the file as a .json format.
  3. Go to Appearance > Editor.
  4. Click on Patterns and select Add New Pattern.
  5. Click on Import Pattern from JSON, and upload the saved JSON file.
  6. You will see a confirmation message: “Imported [Pattern Title] from JSON.”
  7. The pattern will now be available for use.

Convert it with ChatGPT

To convert HTML to JSON using ChatGPT, you can follow these steps:

Copy the following prompt into ChatGPT, replacing the HTML code with your own:

HTML
Create a JSON structure for a WordPress pattern using the following fields:
    - "__file" with the value "wp_block"
    - "title" with the value "Add Title"
    - "content" that wraps the provided HTML block as a string
    - "syncStatus" with the value "unsynced"

Ensure that:
    - The HTML block is placed inside the "content" key as a string.
    - All special characters such as quotation marks inside the HTML are properly escaped (e.g., quotes become \").

The HTML block to convert is:

<!-- wp:cover {"url":"https://pd.w.org/2022/07/87262c92d42acd1c3.73206444.jpg","id":333,"dimRatio":90,"customOverlayColor":"#141414","focalPoint":{"x":0.5,"y":0},"minHeight":50,"minHeightUnit":"vh","contentPosition":"top left","align":"full","style":{"spacing":{"padding":{"top":"5vw","right":"5vw","bottom":"5vw","left":"5vw"},"margin":{"top":"0"}}}} -->
<div class="wp-block-cover alignfull has-custom-content-position is-position-top-left" style="margin-top:0;padding-top:5vw;padding-right:5vw;padding-bottom:5vw;padding-left:5vw;min-height:50vh"><span aria-hidden="true" class="wp-block-cover__background has-background-dim-90 has-background-dim" style="background-color:#141414"></span><img class="wp-block-cover__image-background wp-image-333" alt="" src="https://pd.w.org/2022/07/87262c92d42acd1c3.73206444.jpg" style="object-position:50% 0%" data-object-fit="cover" data-object-position="50% 0%" /><div class="wp-block-cover__inner-container"><!-- wp:group {"style":{"spacing":{"blockGap":"0px"},"layout":{"selfStretch":"fill","flexSize":null}},"layout":{"type":"flex","orientation":"vertical","flexWrap":"nowrap"}} --><div class="wp-block-group"><!-- wp:paragraph {"align":"left","style":{"typography":{"fontSize":"160px","fontStyle":"italic","fontWeight":"900","lineHeight":"0.8","letterSpacing":"-4px","textTransform":"none"},"color":{"text":"#d8a557"}},"fontFamily":"source-serif-pro"} --><p class="has-text-align-left has-text-color has-source-serif-pro-font-family" style="color:#d8a557;font-size:160px;font-style:italic;font-weight:900;letter-spacing:-4px;line-height:0.8;text-transform:none">bud!</p><!-- /wp:paragraph --></div><!-- /wp:group --></div></div><!-- /wp:cover -->

ChatGPT will return a JSON structure similar to this:

JSON
{
    "__file": "wp_block",
    "title": "Add Title",
    "content": "<!-- wp:cover {\"url\":\"https://pd.w.org/2022/07/87262c92d42acd1c3.73206444.jpg\",\"id\":333,\"dimRatio\":90,\"customOverlayColor\":\"#141414\",\"focalPoint\":{\"x\":0.5,\"y\":0},\"minHeight\":50,\"minHeightUnit\":\"vh\",\"contentPosition\":\"top left\",\"align\":\"full\",\"style\":{\"spacing\":{\"padding\":{\"top\":\"5vw\",\"right\":\"5vw\",\"bottom\":\"5vw\",\"left\":\"5vw\"},\"margin\":{\"top\":\"0\"}}}} -->\n<div class=\"wp-block-cover alignfull has-custom-content-position is-position-top-left\" style=\"margin-top:0;padding-top:5vw;padding-right:5vw;padding-bottom:5vw;padding-left:5vw;min-height:50vh\"><span aria-hidden=\"true\" class=\"wp-block-cover__background has-background-dim-90 has-background-dim\" style=\"background-color:#141414\"></span><img class=\"wp-block-cover__image-background wp-image-333\" alt=\"\" src=\"https://pd.w.org/2022/07/87262c92d42acd1c3.73206444.jpg\" style=\"object-position:50% 0%\" data-object-fit=\"cover\" data-object-position=\"50% 0%\" /><div class=\"wp-block-cover__inner-container\"><!-- wp:group {\"style\":{\"spacing\":{\"blockGap\":\"0px\"},\"layout\":{\"selfStretch\":\"fill\",\"flexSize\":null}},\"layout\":{\"type\":\"flex\",\"orientation\":\"vertical\",\"flexWrap\":\"nowrap\"}} -->\n<div class=\"wp-block-group\"><!-- wp:paragraph {\"align\":\"left\",\"style\":{\"typography\":{\"fontSize\":\"160px\",\"fontStyle\":\"italic\",\"fontWeight\":\"900\",\"lineHeight\":\"0.8\",\"letterSpacing\":\"-4px\",\"textTransform\":\"none\"},\"color\":{\"text\":\"#d8a557\"}},\"fontFamily\":\"source-serif-pro\"} -->\n<p class=\"has-text-align-left has-text-color has-source-serif-pro-font-family\" style=\"color:#d8a557;font-size:160px;font-style:italic;font-weight:900;letter-spacing:-4px;line-height:0.8;text-transform:none\">bud!</p>\n<!-- /wp:paragraph --></div>\n<!-- /wp:group --></div></div>\n<!-- /wp:cover -->",
    "syncStatus": "unsynced"
}

You can now import the saved JSON file into WordPress.

  1. Go to Appearance and click on Editor to open the designer.
  2. Click on Patterns, then click on Add New Pattern.
  3. Select Import Pattern from JSON and upload your saved JSON file.

You should see the following message:

  • Imported “Title name of the pattern” from JSON
  • Options have been saved.

Note: If the uploaded JSON file does not include a category, the pattern will be saved under Uncategorized.

From Backup

Depending on your hosting provider, you should have access to previous backups of your site, allowing you to roll back to an earlier version if needed.

At KloudStack, we provide:

  • App Server Backups: Every hour
  • Database Backups: Daily
  • Storage: 6-day soft delete retention time

Conclusion

At KloudStack, we recommend enabling auto-updates for your WordPress core, themes, and plugins. Auto-updates ensure your site stays secure and up to date with the latest features. And remember, WordPress now offers rollback options for themes and plugins, so you can revert changes if something goes wrong. And as a last resort, you can always roll back from previous backups.



Comments

Leave a Reply

Your email address will not be published. Required fields are marked *