I heard that joomla site and wordpress site can easily being hacked. I need some information how can I prevent this hack.
Not now as both of these platforms have made many security changes to their structure and as a result have become more secure than ever. I'm using WP on many of my sites and have never been hacked. Previously WP had some loopholes but they have now shut them by making some security related changes.