To stop your WordPress website from being misused, you will need to disable the XML-RPC (Pingback) functionality on your site, but completely disabling XML-RPC itself is unlikely because it’s needed for important features. Wordpress administrators can check online
WordPress DDOS Scanner tool to find if their blogs are vulnerable or not and if it is, then a better way to block it is by adding the following code to your theme: