The mistake is on both side. I am a web developer and I recommend that you keep a backup of your entire website before hiring any freelancer from any website.
I had 5 clients who came to me because their previous sellers didn’t do the job the right way and destroyed their website.
specially, when dealing with anything that’s even remotely related to PHP and Database, you should make a backup of both your public_html, MySQL database and any other file stored in your server.
There a thing called staging sites. Most web hosting providers have this functionality in their server. When you hire someone next time, make sure that you create a clone site of your original site that’s facing the issue and ask them to fix the clone website instead. When they are done, you could merge these both sites together and all the changes that occurred in the staging site will be inherited by your original site. I always do that before touching a live website.
This way, even if the seller destroys your website, you can still bring it back with the backup you’ve made.
You should contact your hosting provider and ask for the backup if they provide automatic backup solutions. Maybe they do and you don’t know about it. If they do provide the service, you can ask them to restore your website with the backup and hopefully, your website will be back to its glory.
Now, let’s talk about the fiver seller. If it was just a small AJAX problem, you should have hired a seller with atleast 50 positive reviews. If you hire sellers who are new and don’t have anything in their profile to brag about, be prepared for the worst.
You don’t let your new friend to take your brand new Ferrari on a test drive if you haven’t seen him driving before.