How to Protect your wp-config.php and wp-content folder
Pretty posts
WordPress is an open source content management system(CMS). It's a blogging software made by PHP and MySQL. At present, WordPress is the most popular CMS platform than others. Without knowledge of PHP and HTML, you can easily make a WordPress blogging, e-commerce, business etc sites by lot of plugins and themes.
But a hacker can damage your WordPress site if you are not awake by creating new new WordPress exploit and vulnerability. To protect from this, i have shared some of my codes that will help you.
Protect wp-config.php - wp-config.php contains the configuration of WordPress sites. So it's the best important part of your site and you should be kept safe from the public. For this enter your Cpanel and open .htaccess file then paste following code at the top.
Protect wp-content folder - wp-content folder to collect all kinds of required information like images,css,plugins.themes etc. In many cases, hackers took wp-content folder control and can steal many important information. So you need to determine which contents you want to show in public. For determine enter your Cpanel and open .htaccess file then paste following code at the top.
But a hacker can damage your WordPress site if you are not awake by creating new new WordPress exploit and vulnerability. To protect from this, i have shared some of my codes that will help you.
Protect wp-config.php - wp-config.php contains the configuration of WordPress sites. So it's the best important part of your site and you should be kept safe from the public. For this enter your Cpanel and open .htaccess file then paste following code at the top.
# Codiblog Security <files wp-config.php> Order deny,allow Deny from all </files>
Protect wp-content folder - wp-content folder to collect all kinds of required information like images,css,plugins.themes etc. In many cases, hackers took wp-content folder control and can steal many important information. So you need to determine which contents you want to show in public. For determine enter your Cpanel and open .htaccess file then paste following code at the top.
# Codiblog Security Order deny,allow Deny from all <Files ~ “.(xml|css|jpeg|png|gif|js)$”> Allow from all </Files>That's it for this day. I think that you will like.
May be you like:
[Solved] How to hide PHP errors in WordPress
2 Easy Way to Reset a WordPress Password




Ok, I put # Codiblog Security
ReplyDeleteOrder deny,allow
Deny from all
into my htacces file, check it and Yes I can't acces my site. Nobody can't acces it. The best protection but if nobody can acces my site I better delete the complet site then is my wp-config protected.
You can access by cpanel but hackers can't access or see your wp-config.php file.
DeleteNice)
ReplyDelete