Security in Wordpress Flashcards
Q: Why is security important in WordPress?
A: To protect the site from attacks, data breaches, and unauthorised access.
Q: What are the most common security threats in WordPress?
A: Brute force attacks, SQL injection, cross-site scripting (XSS), and malware.
Q: How can you secure the WordPress admin area?
A: Use strong passwords, two-factor authentication, and limit login attempts.
Q: What role does HTTPS play in WordPress security?
A: Encrypts data transfer between the user and the site, preventing interception.
Q: What is the purpose of the wp-config.php file?
A: To store critical configuration settings and database credentials.
Q: What plugin can you use to limit login attempts?
A: Limit Login Attempts Reloaded.
Q: How can you change the default WordPress login URL?
A: Use a plugin like WPS Hide Login.
Q: What is two-factor authentication (2FA)?
A: A security method requiring two forms of identification to log in.
Q: What function allows you to check login failures?
A: wp_login_failed hook.
Q: How do you disable XML-RPC to prevent brute force attacks?
A: Add the following to your .htaccess file:
<Files>
Order Deny,Allow
Deny from all
</Files>
Q: Why is it important to use the principle of least privilege?
A: To limit users to only the permissions they need, reducing security risks.
Q: How do you check a user’s permissions programmatically?
A: Use the current_user_can() function.
Q: How can you secure the wp-admin directory?
A: Use a password-protected .htaccess file.
Q: How can you audit user activity in WordPress?
A: Use a plugin like WP Activity Log.
Q: Why should you avoid using the default “admin” username?
A: It is commonly targeted in brute force attacks.
Q: What permissions should be set for wp-config.php?
A: 400 or 440 to prevent unauthorised access.