First, both of these things (updates and sane file permissions) are neither “OR” choice or optional. That is what you just do, because if you don’t sooner or later (even if significantly later) you are going to have problems because of it. Relatively I would say updates are more important, because faulty file permissions tend to harm when in already compromised environment (like poorly configured shared hosting).
Second, if you repeatedly experience infection of your site(s) then neither of the two would do anything for you. You have serious hole somewhere, either easily detected to be exploited by automated scanners or someone knows and keeps exploiting manually. Before you determine what that hole is and how to close it any other security measures are pretty much moot.
Related Posts:
- Reject all malicious URL requests functions.php
- Upgrade to PHP7.3 and Changing Apache from Prefork to Event Breaks WordPress
- WordPress Memory limit not increasing
- what to do after instlling cyberpanel on VPS
- PHP $_SERVER[‘HTTP_HOST’] vs. $_SERVER[‘SERVER_NAME’], am I understanding the man pages correctly?
- What are PHP extensions and libraries WP needs and/or uses?
- Enforcing password complexity
- Is it safe to use $_SERVER[‘REQUEST_URI’]?
- cURL 28 error after switch from to brew php 7.2 on localhost
- How Attackers write script into my php files?
- How to run multiple Async HTTP requests in WordPress?
- WP CLI info showing correct PHP binary but wrong version of PHP
- Does the debug.log do log rotation?
- Renaming wp-content folder dynamically
- How do I create a WP user outside of WordPress and auto login?
- Security – Ajax and Nonce use [closed]
- Is it unsafe to put php in the /wp-content/uploads directory?
- Your PHP installation appears to be missing the MySQL extension which is required by WordPress
- Can I view my own wordpress php source code on my hosted web server?
- Sanitize get_query_var() url parameters
- apache cpu over 70% on localhost
- Is it possible to move wordpress out of webroot?
- login wp impossible
- WordPress Site front End and Back End Loading Slowly
- Memory errors with media upload, WordPress can’t use more than 96M (while there’s 512 available!)
- Is this code malidcous
- Admin username and password
- WordPress (3.9.1) MultiSite Permissions. Is chown the answer?
- Is XAMPP faster than running LAMP in WSL on Windows 10? [closed]
- WordPress custom login form using Ajax
- WordPress Site Running Extremely Slow on Dedicated Server
- How to enable Zend Optimiser+ with Batcache
- Can you run WordPress on a MarketLive/Java EE server?
- Detect session/cookie variable in wordpress to prevent access to documents
- Is there any risk setting WordPress file permissions and FS method to ‘direct’ on localhost?
- SQL Injection blocked by firewall
- How to prevent XSS alter custom global javascript object & methods in WordPress
- WordPress admin dashboard missing icons
- WordPress returning 404 for multisite pages
- Generating an nonce for Content Security Policy and all scripts – How to make it match/persist for each page load?
- how to combine wordpress htaccess on my root domain + php on subfolder
- How to disable server signature on wordpress? [closed]
- Posting and image insertion problems after EasyApache4 and PHP 7 upgrade
- How do I get around “Sorry, this file type is not permitted for security reasons”?
- wp-comments-post.php file returns a blank page
- Configure Php server with ISAP
- WP & Server Speed [Teacher Question]
- Correct and safe way to include php content in my page
- Password minimum length in personal subscription [closed]
- How to add API security keys into JS of wordpress securely
- Is it best to avoid using $wpdb for security issues?
- 3 different times on my WordPress website
- Hardening uploads folder in IIS breaks images
- How does WP work in conjunction with a web server?
- Troll the hackers by redirecting them
- how to prevent wordpress admin from logging in via woocommerce my-account page
- WordPress hit memory limit but not from the server
- malware undetectable by multiple scans
- Permalinks are not working in WordPress in digitalocean
- How can I find the cause of a 500 server error?
- Problems clearing cache
- Updating From Mobile App – Exposing Site to Hacking
- How to prevent a function from running based on host (ie web vs local)?
- security concerns if using html data-* attribute for l10n?
- Problem with data collection in tables
- portfolio site – about this site section – is it safe to post some code
- How can I update WordPress plugins or WordPress itself in all server?
- echo cutom css code to WordPress page template file ? is this safe?
- current_time function incorrect in plugin and PHP, not in WordPress admin
- (solved) WordPress Site not loading properly
- How to secure my php forms
- $.ajax results in 403 forbidden
- wp_signon works local, not on https
- How to edit content in WordPress and the Polylang – plugin? – with demosite
- Site infected by link
- Access WP files on “server 1”, from “server 2” – using wp-load on an external website
- Windows Setup: Error establishing a database connection
- Huge time to first byte on live site
- Unexpected behavior when trying to manually install WordPress on macOS Sierra
- Deny php execution in /wp-includes – using .htaccess in /wp-includes VS root folder
- WAMP SERVER Command Prompt SET PATH=%PATH%
- Creating Log-In Page for backend server
- 403 Forbidden Localhost Wamp Apache Php
- Strange special character/Latin characters
- Previewing/Updating some Pages causes “The requested URL was rejected” Error
- What is the best practice for restricting a section to logged in users?
- Rewrite /keyword1+keyword2.html to search page | .htaccess
- Ajax call URL 404’ing when pushed to staging server
- Published custom posts missing
- Not logged in when using http
- Admin-area broken through weird issues
- Blog only showing code
- Having an HTTP error 500 after migrating a website
- changed front-page template gives 500 error
- How to quickly/easily make an analysis (reverse engineering) of WordPress?
- session_start(): Cannot find save handler ‘mm’ – session startup failed in /sites
- how to put shortcode to the top of the page – theme 2014
- How to avoid timeout waiting for output from CGI script?
- How can I prevent wordpress from sending emails
- PHP 7.3 is required for WordPress 5.2 or Recommendation