How to upgrade WordPress to a specific version? - Adame Dahmani

How to upgrade WordPress to a specific version?

Some will ask: Why will any one need that?
  • Hosting environment conflict with a newer version of WordPress
  • Theme/plugins conflicts
  • Vulnerability on WordPress core still not patched
There are 3 ways to handle that. [update type=”important”]Always make a backup before trying any of these options.[/update]

#1 By using WP Downgrade plugin

WP Downgrade helps lock upgrades and downgrades to a specific WP version. Here is how you need to proceed:
  • Go to Settings > WP Downgrade settings page.
  • Set the WordPress target version (you can use WP releases page to find the right version number).
  • Hit Save Changes.
Now, WP’s core updating system will suggest you to upgrade/downgrade to the new version. If no message shows up, you can go to Dashbloard > Updates and proceed with the upgrade/downgrade.

#2 By using WP CLI

If you hosting service has WP CLI enabled or if you are using a VPS, you do the desired upgrade/downgrade using WP CLI. To update or downgrade, use the following command:
  • wp core update –version=4.9.10 –force
Replace the version by your target version.

#3 By manually replace core files

This will require an access to website’s directory through FTP. All you have to do is:
  • Download which version of WordPress you want to use from WordPress official releases page.
  • Unzip on your desktop.
  • Remove the following files and folders: wp-content, wp-config-sample.php.
  • Connect to your website through FTP and upload all the remaining files.