Updating is relatively easy and straightforward if you haven’t customized your theme, but what if you have? When the theme is customized you have to plan ahead and prepare your site for each update. This can be rather annoying and time-consuming but in the end still better than always running the outdated version of the theme.
It’s time to update, what to do?
- First step before every update is to backup your theme files and database:
Theme files – the quickest way to backup theme files is to rename the current theme folder to something like “Theme_old” and upload the new theme folder. Just in case you can also download the theme folder to your hard drive
Database - check out the official WordPress backup article for instructions
- Download the latest version of your theme from member area to your hard drive and extract it.
- Connect to your server and navigate to the /wp-content/themes folder. For help regarding this step please read/watch the following tutorial.
- If using FTP simple drag the theme folder from your hard drive to the /wp-content/themes folder on the server. If asked to overwrite, hit Yes. This step will delete all your themes customizations so make sure you have everything backed up
There is a small trick with which you can backup theme files and update in the same go. When it’s time to update, simply rename the current theme folder to something else (like Theme_old) and just upload the latest theme version (folder). Watch out for folder names; the name of the existing theme (folder) must not change at any time
- If your site isn’t customized you are done – the theme has been updated, feel free to stop reading. If your site is customized your theme is updated as well, but you need to retrieve the customizations, please continue reading
- Assuming you know which files are customized.. open change_log.txt file included inside the theme root folder and see what was updated since the last version. If a file you customized isn’t mentioned in the change_log just upload it to the server (replace it with the new/updated file). If however you see that one of the files you customized has been updated do one of these three things:
- Upload the file back to the server without doing anything (not recommended)
- Redo the customization in the new file
- Compare the two files using services like DiffNow or programs like WinMerge to see what are the differences. You can then either redo the customization inside the new file or apply the updated code in your customized file.
- Once you upload all your customized files back to the server you are officially done with the update! Congrats!
To make future updates easier we recommend the following
- Use custom.css for all design (css) customizations. With custom.css you can customize your css files much much easier. Instead of connecting to your server and updating each file separately you have this one file (accessible from Appearance -> Editor) which you can edit to customize your site. To learn more about custom.css please click here. Our advice is to use custom.css whenever you can. Things like hiding elements can be done both with css and in actual php files. It’s much easier to backup one file (custom.css) compared to several php files.
- Unfortunately not everything can be customized with custom.css, sooner or later you’ll find yourself customizing a php file. We recommend creating a folder on your hard drive and keeping track of each file you customize. That way when it comes time to update you already have all your customized files backed up and ready to go. This folder will also come in handy if (knock on wood) something happens to your site and you lose all your theme files. Stock theme can always be downloaded from the member area, but if you don’t back them up – your customized files could be lost forever.