Securing my WordPress Files and Directories

Why would you want to protect them all? Not all of them need protecting, in my humble opinion. In any event, these are good to have in your .htaccess file: 1: restrict access to wp-config.php <Files wp-config.php> order allow, deny deny from all </Files> 2: restrict access to .htaccess itself <Files .htaccess> order allow,deny deny … Read more

Which WordPress scripts need to be executable for a fresh installation?

Due to WP admin architecture this would be really inconvenient list to compile and maintain reliably. My best educated guess is that many (but possibly not all and not just) of these files would need to require admin bootstrap (wp-admin/admin.php) to function. I ran a quick search on respective directive with following results: C:\server\www\dev\wordpress\src>ack –files-with-matches … Read more

Completely remove the author url

You can add this to .htaccess file, it will redirect all author requests looking for a number ( Author ID ) to the homepage: #Disable Author Pages <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_URI} ^/$ RewriteCond %{QUERY_STRING} ^/?author=([0-9]*) [NC] RewriteRule ^(.*)$ http://%{HTTP_HOST}/? [L,R=301,NC] </IfModule> The PHP / WordPress way, you could use Template Redirect: … Read more

Sanitize get_query_var() url parameters

There’s a slight disconnect between your question title and the actual question. It sounds like you’re using a plugin (or developing a plugin?) that allows for some front-end sorting. If it’s a plugin you’re using and the query string parameter is not sanitized, you need to notify that plugin’s developer, because that’s a security issue. … Read more

Whats the safest way to output custom JavaScript and Css code entered by the admin in the Theme Settings?

Allowing user to control code is explicitly unsafe operation. As you note the purpose of sanitization is pretty much to not let user slip in anything executable and/or with malicious intent. To “sanitize” executable code you would need programmatic understanding of it (code parser) and criteria engine to distinguish what is safe and what is … Read more

Frontend Password change

I think you are referring to two different things.. 1) Verifying the request. You should be using WP Nonces to verify the request and protect it against XSS. That should be a practice for all your forms. you could also add additional layer of security by integrating a reCAPTCHA. 2) Data Encryption when you attempt … Read more

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