Jump to content

Be warned - this post is over two years old, so the details may be out of date!

13 January 2017 Reading: 2 minutes

The worries of taking on an unknown site

As a freelancer I know the fear of taking on a new client, and them bringing across a website that's out-of-date!

As a freelancer, and part of an agency, I've had clients come along and say "I like my website, but would just like a few updates". This is never a problem, until you take a look at the code and realise it's been written by someone who's ripped apart a badly coded theme.

Sadly this has happened more times than I'd wish for.

Over the past few years I've come up with a few steps on how to handle this kind of situation with magic

Assess the code

You need to check how the sites been built. What framework has been used? Has inline styling been abused? Or is the site written cleanly and neatly?

Also it's best to run a security check, just to make sure no virus's or malware have been included, as this would mess up your brand new spanking code.

Check if it's running a theme? If that theme runs off backend styling, then that's something to take into consideration as you'll waste time in your CSS files otherwise. Also check if the theme has come custom post types so you understand what's being used and where.

Backup & Staging

After getting an assessment of how the site is built, it's best to do a backup, this is just in case something conflicts or goes wrong during the update and you have something to fall back on. This is best to do for the theme and the database, so nothing is lost.

Now you can use this to set up a development or staging site. NEVER do changes on a live site, it's just not safe so please just listen to me on that one. You can import the theme directly through wordpress and there's dozens of ways to create a database environment for your development site, like tools such as XAMPP.

Now for the update

Now you can let loose. Update the site, rebuild it, or do whatever the client has asked from you! This'll probably take some time, just because it's unknown code and it's always best to be cautious. Everytime you make an update just check the front end of the site, to make sure nothing has been broken.

Push it live!

You can show your client the development site, and once this is signed off it's time to push your dev to live! There's a few ways to do this but the simplest to to overwrite the installation of the theme. Make sure this works 100% straight away though and if there's any issues you can reinstall the backup you made earlier!

Done!

That is it! These are my tips to make sure you don't find unknown code scary, but see it as more like a challenge. I've found doing these kind of sites has been the best way for me to improve my knowledge in front-end development.