Alright, while running a digital marketing agency – you will come across few client’s websites that haven’t been updated for quite a while.
Often these sites are not updated as clients don’t want to spend extra money for WordPress maintenance or don’t really care unless and untill something breaks.
Well today, I needed to update a website which hadn’t been updated for quite a while. The site was added via ManageWP for monthly backups – but we didn’t update any plugins unless really necessary.
- Original Website Made: Year 2015 ( 6 Years Old Website )
- Existing WordPress Version: 5.1.1
- WooCommerce: No
Reason: The site is hosted on a server with PHP 5.4.2 . The hosting company decided now its high time to update the PHP to 7.4 and gave 2 weeks notice to all its customer.
Obviously these means the way the original theme’s code will no longer work with new PHP settings and the website will break. The existing active theme- when checked was abandoned now
- For a site that’s very old and with PHP 5.4.2 only few backup plugins will work. List of plugins are WPVivid / Updraft plus etc.
- I tried to take backup of the site and migrate the same on new server with PHP 7.3-7.4 – but it caused issue and gave 500 error on the staging domain
- I tried blogvault – cloudways migrator and though it showed success – it also threw same error like WPvivid when I tried to access WordPress admin dashboard.
- Since all these methods failed I tried the manual method of migration. I installed fresh copy of WordPress 5.1.1 on staging domain
- I then utilized WPVivid to just migrate the database.
- With these migration, I was able to get all the content excluding the images / videos etc on the staging domain
- Next, I took a backup of wp-content folder on main domain and uploaded the same on staging domain.
- Well – it then started showing the same error as earlier migrations via other methods
It’s in time like these that error_log file located in the root of WordPress folder proves to be the most useful to diagnose and fix errors
I checked the error_log file and found the theme was the issue. Specifically one function was causing issue. I quickly renamed the theme to deactivate it and behold the website started working.
Ofcourse, the formatting had issues and wasn’t looking proper.
I also deactivated the plugins and activated the plugin one by one to check if all plugins were working correctly.
I found Revolution Slider was having issue with new PHP version. The plugin was outdated. Ofcourse it had to cause issue.
I updated the WordPress 5.1.1 to 5.7.2 and update was successful.
Once the update was successful – then came the next crucial step to replicate the site for new version and PHP version
I picked Kadence theme as I thought I could easily replicate the existing layout with it
- Once Kadence theme was installed, I also installed Kadence blocks for typical Row Layout blocks which I use a lot.
- Once Kadence theme and Kadence blocks were installed and activated – I moved to the next step of replicating.
- I used Hoverify to find fonts of the existing website and changed the same under typography settings of the theme on new staging domain.
- Next again I used Hoverify again to pick colors and add them again as global colors in Kadence theme
- Once fonts, colors were added, I move to customizing Header, Footer, and Layout element of the site.
Once Header, Footer and base layout was made ready – I moved on to removing shortcodes from existing pages.
Luckily the website in question , wasn’t using WP Bakery Builder or any specific theme which add lot of shortcodes to build layout.
Since they were just handful of pages, I decided not to use Shortcode Cleaner plugin and do it manually.
Using Kadence Blocks / row layout I quickly replicated the layout.
Gutenberg is awesome, if you know how to use it. Using drag and drop / resuable blocks etc you can easily make layouts as you required.
I updated Revolution slider – as didn’t want to spend much time replicating the same slider with all those animations etc on new site. Also client I was sure – damn sure would need it.
Once slider was finished and all the pages were completed – I needed to replicate the form on the site.
The existing form on the site was using Contact Form 7 and once self hosted form.
The site had a Request Quote form feature which had few sections which opened conditionally based on selection
I used Fluent Form free version to replicate the same form on the new site. Within 15-20 mins using Checkbox and Bulk Edit and Conditional Login and Layout scheme I was able to replicate the Request Quote function.
Well the whole exercise did take me 6 hours which is quite a lot but a major part of the issue was spent in diagnosing the issue or having a proper SOP to migrate a very old sites like these.
Luckily, after today’s personal experience – I know how to tackle it. With the new theme built based on a very popular theme and Gutenberg , I see the website atleast future proof for another 3-4 years unless client decides to redesign the layout etc.
This blog post , is more to provide you ways to approach updating old websites or websites which need to be updated to optimize for page speed etc.
Hope you find it useful
Till then next time.