Posts

Showing posts from October, 2016

Disable File Editting in Wordpress Admin Area

It's recommended to disable the File Editor option under Appearances in your Wordpress Admin area by adding these lines to your wp-config.php file /** Disable File Editting within Wordpress */ define('DISALLOW_FILE_EDIT', true);

Password Protect Wordpress Admin folder from the Server's side

1. Create your .htpasswd file by running the following command: htpasswd -c /home/brendan/public_html/.htpasswd your_desired_username (where you should change "your_desired_username" with the actual username that you want to use) 2. With the .htpasswd file now created under your /home/brendan/public_html/ directory, you can go ahead and add the password protection to your wp-login.php file. You can do this by adding the following rules to the .htaccess file in /home/brendan/public_html/: <Files wp-login.php> AuthUserFile /home/brendan/public_html/.htpasswd AuthName "Private access" AuthType Basic require valid-user </Files> 3. Then create a new .htaccess file in your /home/brendan/public_html/wp-admin/ directory and put the following lines in it: AuthUserFile /home/brendan/public_html/.htpasswd AuthName "Private access" AuthType Basic require valid-user <Files admin-ajax.php>   Order allow,deny   Allow from all