Maybe you are thinking about what is the best way to update a WordPress Theme? Anxious about losing your WordPress customizations straightaway. No worries, it’s natural for every user to be-careful about their themes.
WordPress professionals suggest updating the theme so that your website is protected from illegal computer nerd or any spyware.
You can update your themes in several ways, from automatic updates to manual ones. Although, before updating your theme it’s best to backup your WordPress theme to make sure you don’t lose any design. For Backup, check out my Step-By-Step Guide to Backup your website.
OK, let’s get straight to the point.
Automatic updating the WordPress Themes:
By working smarter, updating the themes is just a piece of cake for the users and requires less time.
When the update notification pop-up in the dashboard, it means the latest version of your theme is now available for update.
Presently, the latest version of WordPress 5.6 available. WordPress will automatically notify you when the coming or latest version is available so you can update it according to your preference.
To update the theme at the back-end, you have to add an easy code of line in the fucntions.php file.
Code for updating a theme
For automatic updates you can write this code:
add_filter( 'auto_update_theme' , ' _return_true' )
This method will work specifically for the themes that are downloaded inside the WordPress official theme directory.
If you download the WordPress themes from any other third-party website then you should follow their instruction for updating the themes accordingly.
Updating your File/Theme/Plugin Manually:
You can manually update the files of your website using the SFTP client. So, what FTP does, it makes a connection between your computer and the website server. Then you can transfer the files between the server and your computer.
Start-up a connection
First, build up a connection to your site having access to the SFTP clients, WinSCP, Transmit, and FileZilla. And for this post I’m going to use WinSCP.
This method gives you a hand to customize your website and after you are connected to an SFTP. Go to open wp-content >> themes to download your themes and make a folder.
You can see from the top bar, that I’m in /themes/ folder as followed by /home/u377884239/domains/wppedia.org/public_html/wp-content/.
Download the latest version
Now, head over to dashboard, and download the latest version of the theme you want to customize.
As you have SFTP access you can download one manually and upload it to your themes folder.
For the comparison of themes, first, use a file comparison software for both theme versions.
It is quite tough for a single user to manually compare each file and find the mandatory changes.
There are hundreds of software for comparison, however, WinMerge is considered to be the most accurate software for this purpose.
WinMerge will show you a catalog and files in both of your themes. It also shows you an interface of which files are identical and which files differ from each other.
Using WebMerg to copy the tweaks
For comparing the theme, and making the necessary changes.
First, right-click on a file and select the Compare to make changes in both the themes.
You can identify the separate files and make the essential changes in the new theme files folder.
After the relevant changes, you have done, copy the tweaks to the latest version of the theme.
After done, replace your current live theme by uploading the new version on your website using an SFTP client.
Child Theme an ideal solution
Most users customize the CSS or functions.php files and tweak their parent theme files. There might be a risk of using this old method of customization.
For accurate customization, a child theme method is the safest and leading way of website customization.
A child theme has the characteristics and built-design of a parent theme and makes sure that your customization is safe.
It accelerates the procedure of evolution, so you never ought to worry about losing your customization.
Advantages of Child Theme:
- Trouble-free updates.
- No worries about changing things manually.
- A handy feature for restoring the data automatically.
- A simple way to restore the site.
- It proceeds as a covering on top of your present WordPress theme and gets its characteristics.
- An easy way to broaden the theme framework without a long story of code.
- Protected update feature for both the parent and child theme while updating.
So now hopefully, you would be able to update your theme without having to worry about the customizations you made.