First, map any legacy custom components that might be hidden beneath the surface.
IMPORTANT: Be vigilant for old features or dependencies that may cause difficulties when migrating.
Now it’s time to find a new location for your custom code.
Copy the relevant custom code files from your Umbraco project into the new library project. Be sure to include all necessary files, including controllers, models, services, and any supporting classes. By isolating it as a standalone library or module, you are not just cleaning up your Umbraco project but also establishing a distinct separation between core features and customizations.
The next step will be to carefully outline its dependencies. This will facilitate the future upgrades and troubleshooting.
Take a look at your custom code and give it a refresh if it’s displaying signs of being outdated or inefficient.
Do not hesitate to get your hands dirty, you will appreciate it in the future.
Check the core features of the website and confirm everything works as intended.
It is important to check if the isolated code is still doing what it is supposed to do.
Run unit tests and integration tests, if any.
Now it’s time to merge the library back into your Umbraco project.
Keep it clean. Ensure that you keep a distinct division between your custom code and the fundamental Umbraco elements. This will make maintenance easier.
Future upgrades can now be implemented smoothly without disrupting your custom functionalities. Make sure to repeat the process for all legacy custom code. But if you're having trouble with a particularly nasty bit of code, why not ask the experts at FreshConstruct - we'd be happy to take a look for you!
Then why not sign up for our newsletter! Keep up to date about the content your business needs to know.