If you’re a WordPress user then you need to update your WordPress theme regularly. This is in addition to making sure your plugins and the WordPress version are kept updated. For example, in the last three months alone there have been at least three WordPress core updates which means we’re up to version 4.4.2 at the time of writing.
All of this relentless updating is for a combination of reasons:
Better security
Security is arguably the most important reason why you should keep your WordPress theme up to date.
WordPress currently powers 23% of all websites in the world. Due to its popularity, WordPress is a popular target for hackers, malicious code distributors, data thieves and hackers; the benefits of being open source means anyone can study the source code to learn and improve it. However it also means that hackers can study it too and find ways to break into websites.
New features
By updating you’ll have access to the latest features and improvements.
Speed
It is likely that the latest version of the theme will be faster than previous versions as developers find more efficient ways of writing code, storing data and other enhancements.
Bug fixes
Despite the rigorous testing, sometimes bugs may slip through so the latest version will fix the last batch of small issues.
Compatibility
All environmental factors like the server hosting, MySQL version, latest browsers are continuously updated for the same reasons described previously so your theme needs to keep up so it is compatible.
How to update your WordPress theme automatically
You can opt to update your theme automatically by placing this line of code your theme’s functions.php file.
add_filter( 'auto_update_theme', '__return_true' );
This will then download the latest version of your theme and update to the latest version automatically. The main issue is the lack of manual control over timing and backing up the site just before an update so if something does go wrong you can quickly roll back the site to a previous working version.
Therefore we would probably prefer the option of manually updating your website theme and it’s actually pretty straightforward if you follow this method.
How to update your WordPress theme manually – the folder rename method
The first thing you should do is backup your website files and database. If your pushed for time then make sure you take a backup of your database using myPHPAdmin.
- Download the latest version of your theme.
- Using your Control Panel’s File Manager or a FTP program like FileZilla navigate to the themes folder wp-content/themes/ and identify your current theme.
- Make a new Folder in the themes folder and call it something like ‘themename-new’ where ‘themename’ is the exact name of your current theme.
Upload the updated theme folder zip file to the ‘themename-new’ folder and unzip using Control Panel or unzip on your local PC and use your FTP program to upload the files into the folder. - Rename the current ‘themename’ folder as ‘themename-old’.
- Quickly rename ‘themename-new’ to ‘themename’ so it becomes your new active folder.
- Your WordPress website will now be using your updated theme.
If you use a child theme then all your customisations should have been preserved, if you don’t then you can update without losing your customisations. See this blog post for more information – How to Update a WordPress Theme without Losing Customization
Next time you login you will automatically be using the updated theme but still retain the old theme should something not look right. If there are more serious issues then you can roll back using your previous backup of website files and database.
This is a relatively straightforward and safe way of updating your WordPress theme which we have used on many occasions.