Security: blocking direct access of php files

In my opinion, the only way to do this (within the context of WordPress) is: if ( ! defined( ‘ABSPATH’ ) ) // Or some other WordPress constant exit; The second technique is vague and does give the same level of checking (it only checks that the filename of the main PHP file matches itself, … Read more

Limit Login Attempts BEFORE PHP is executed?

If the “attack” is distributed, the only thing you can do is to change the url of the login endpoint. This should be easy to do with web server config (block /login and friends, map some other “slug” to wp-login.php). This will also break the automatic redirect from /wp-admin to /login which is a good … Read more

Restrict Access in Admin Panel

I believe the correct solution here is to just update the $capability component of the admin_menu items rather than just remove them from the menu structure. Try this: /** Set ‘administrator’ cap for particular menu items **/ function update_admin_menu() { global $menu, $submenu; $menu[10][1] = ‘administrator’; // Media foreach( $submenu[‘upload.php’] as &$item ) { $item[1] … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)