Just to add to the answer by @birgire, check this post on how to hide the fact that you are using WordPress.
I also think that no post basically covers this, but it really help nothing following and applying everything to hide the fact you are using WordPress and to secure WordPress, and your code in itself is a security risk.
Hackers are stubborn and always have a point to prove themselves that they can hack a site that they have set their mind on. The measures named in the linked post is just there to make it difficult for hackers, not to secure your site. Once hackers have the source code to your site, they can use bad, insecure code against you. For that reason, it is always very important to keep your site up to date and use only the latest code as set out in the docs, and regularly check for any code or practice that might create a loophole which hackers can exploit.
Related Posts:
- Should I remove install.php and install-helper.php?
- How to get WordPress to save upload file beyond web root [closed]
- Securing a multi-user permission structure
- wp-config.php being written by attacker
- Renaming install.php for security?
- Are there security risks in working directly in the themes folder that builds into a theme folder?
- wp-content – permissions for files/folders created by apache
- Why are the latest visits to my website originating from my own website?
- Avoid ‘uploads’ 777 permissions: Potential threat or clean solution?
- Directory to store secure file
- SSL Error: unable to get local issuer certificate
- When you use ‘badidea’ or ‘thisisunsafe’ to bypass a Chrome certificate/HSTS error, does it only apply for the current site? [closed]
- When you use ‘badidea’ or ‘thisisunsafe’ to bypass a Chrome certificate/HSTS error, does it only apply for the current site? [closed]
- Why does the URL http://a/%%30%30 crash Google Chrome?
- When you use ‘badidea’ or ‘thisisunsafe’ to bypass a Chrome certificate/HSTS error, does it only apply for the current site?
- Can an attacker use inspect element harmfully?
- Where does Internet Explorer store saved passwords?
- WordPress 4.7.1 REST API still exposing users
- Should I escape wordpress functions like the_title, the_excerpt, the_content
- Why does WordPress need my private ssh key to update?
- When to use esc_html and when to use sanitize_text_field?
- Will there be security updates for 3.1 once 3.2 is released?
- WordPress it’s cleaning a custom query_var to avoid sql injections?
- Can someone explain the use cases of esc_html?
- Tips for finding SPAM links injected into the_content
- Is WordPress vulnerable to the httpoxy?
- wp.getUsersBlogs XMLRPC Brute Force Attack/Vulnerability
- Is there a security risk giving someone temporary access to my blog’s code?
- Is /wp-login.php?redirect_to[] exploitable?
- How to properly sanitize/secure a WP Query coming from the front end
- Sub-domain or 2nd, temporary different domain?
- Website is being flooded [closed]
- What is the most secure way to set up the MySQL user in WPMU?
- Why was my blog post inserted lot’s of ad links by others?
- Should I Worry About SQL Injection When Using wp_insert_post?
- Auth cookie value security risk?
- Security – Shortcode injection attack
- Registration Plugin – Recaptcha integration
- wp theme.. Could not create directory
- Security threat with `home_url`?
- How to combat flooding admin-ajax.php?
- When is wp_set_password() called or how to capture a password
- Moving away from MD5: Where to declare the custom global $wp_hasher?
- Would it be dangerous to send all the wp_options to javascript file?
- Correct folder permissions?
- Is there a way to hide WordPress behind a web visible directory?
- Should I disable directory listing for wp-includes?
- How to get WordPress to send Password Reset Link Email instead of New Password?
- Safety side of storing emoji into database
- How can I safely hide the fact that my website runs on WordPress? [closed]
- How can I display nickname instead username in links
- My WordPress Websites are always under attack
- Is there value in using a wp_nonce for POST requests?
- How to hide easy access to my website temporarily?
- Can I Remove xmlrpc.php completely?
- Multisite installation on an existing single installation
- How much should I worry about these messages?
- Security concerns with external links
- Uploading .webm format on WordPress results in security guidline breach and fail
- Any any insecure http:// URLs left in wordpress?
- White screen of death on admin pages after moving wp-config up two levels for security
- .htaccess password protection bypassed
- Can a WordPress administrator see other users’ passwords?
- Why my plugins are updating automatically?
- google xml sitemap won’t work on directory install
- Privilege escalation bugs in 2.9?
- Content-Security-Policy blocks WordPress check boxes from being activated
- Prevent editor from adding script or form
- Does WordPress refer to any files outside of the main install folder (and database)?
- Finding where a snippet of code is coming from
- wordpress admin security
- Remove hacked code – out of ideas! [closed]
- Why do people use “admin” username by default? [closed]
- Moving from subdirectory and subdomain -> root
- Powering only a subfolder with WordPress on a LAMP stack with an nginx reverse proxy
- WordPress Database Re-installed (Hacked)
- WordPress Security tools
- Install second wordpress in root subfolder, Error 404
- Robots.txt file not updating
- Security: Critical backend outside of wordpress
- Advice On How to Backup WordPress
- How can I stop other plugins from using my class’ sensitive methods?
- What are WordPress Current Security Issues in 2017?
- wp-config.php moved above root results in no plugin updates
- Installation directory for WordPress and child theme
- Password-protect feed and make it usable in major aggregators
- How to replace a wordpress installation in root directory with another in a subdirectory?
- Should I change the default file and folder permissions?
- WordPress exploited theme is causing high io load on server
- WP white screen of death after duping a site that works fine on same server
- how to find the way they hacked my WP site
- How to set custom validation for WordPress Passwords?
- Is it a bad idea to CHMOD 777 all the files on your site?
- is this code properly secured
- nginx + wordpress: Best practices for configuring it to be secure, reliable, and fast? [closed]
- How to get real password (before encrypt) when register a user?
- Our security auditor is an idiot. How do I give him the information he wants?
- I am under DDoS. What can I do?
- SSH keypair generation: RSA or DSA?
- WordPress – tracking options