I've had two WordPress blogs. That was in a time when I was doing almost no internet marketing, and until I found time to deal with the situation (weeks later), these sites were penalized in the major search engines. They were not eliminated the evaluations were reduced.
In my view, the best way to make sure your that is how to fix hacked wordpress is via the use of a WordPress backup plugin. This is a fairly inexpensive, easy and elegant to use way to make sure your site is available to you.
There are ways to pull off this, and a lot involve copying and FTPing files, exporting and re-establishing much more and databases. Some of these are very complex, so it's imperative that you select the check one that is best. Then you might want to check into using a plugin for WordPress backups if you are not of the technical persuasion.
It's a WordPress plugin. They're drop dead simple to install, have all the features you need for a job such as this, and are relatively cheap, especially when compared to having to employ someone to have this done for you.
Another step to take to make WordPress secure is to upgrade WordPress to the latest version. The reason for this is that with directory every new upgrade there come fixes for security holes that are older which makes it essential to upgrade early.
Using a plugin for WordPress security just makes sense. Backups will need to be performed on a regular basis. Do not become a victim of not being proactive about your site because!