How to disable directory files from accessing?

If you are doing it for security purpose you can use following steps: add index.php file to each folder that you don’t want to show the content of. <?php // Just leave the index.php file blank And second way to reduce insecurity is to use if(!defined(‘ABSPATH’)){ exit; } inside every php files to no access … Read more

Automating WP application directory creation (domain name passed as a variable argument)

Ok, I just checked the WP CLI documentation. There are 3 important steps: Download WordPress: (I would use it with the options –path and –locale, but those are optional) wp core download Create a proper wp-config.php: wp config create –dbname=… –dbuser=… –dbpass=… –dbhost=… Install WordPress: wp core install –url=… –title=… –admin_user=… –admin_email=… Now there are … Read more

Clean installation missing its /wp-content folder

I kept on searching, and finally found something that fixed this issue. For those who are using CentOs 7 in combination with Plesk 12: The issue is with SELinux. When it’s used in Enforcing mode (which is the default), wp-content does not show itself via FTP. Switching it to Permissive mode or disabling SELinux altogether … Read more

Theme file structure best practice

You first need to ask yourself: Will this theme ever be maintained or used by other people than me? If so, read on, if not, you should only build code that will eventually make sense to you when getting back to this project after a few years. If you are creating a theme that will … Read more