image that says update wordpress

How To Update WordPress Automatically Without Using FTP

June 17, 2021

First off it is critical to keep your WordPress and the plugins associated with it up to date as often as possible. Someone I did a website for a long time ago reached out me to see what happened to their website. I visited the site and right away I knew that their WordPress installation got hacked. They were shocked by this as they said their security settings such as the directory and file permissions on their server were set to be as read-only. This can be a benefit to keeping your site secure, but it also prevented them from easily updating their WordPress installation and the plugins. I see this as being a bigger issue than the directory and file permissions.

So in some cases, you are not able to update/upgrade your WordPress and plugins to a newer version without providing your FTP connection information. This is a common issue whereby the WordPress system can’t write to your /wp-content folder directly. I was up late the other night resolving the issue and forgot to ask the client for FTP credentials. I did have the FTP stored in my FTP client but the details are encrypted so I couldn't view them. Well, I discovered a safe workaround that will allow them to keep their directory permissions and be able to update their site. FTP[1] There are normally two ways to solve this issue. You need to define the FTP details in your wp-config.php file so WordPress will remember it. Alternatively, you may also provide WordPress with write access to your /wp-content folder by accessing the FTP root file and changing the folder file permission (CHMOD) to 775 rather than the default 755 and 644. Or in my case -----> There is, however, an easier way to deal with this; by defining constantFS_METHOD in your wp-config.php file. This bypasses WordPress’s recurring prompts and allows auto-updates of your files to happen. And it takes only 1 line of code to do this.

1. Open /wp-config.php

Now the first thing you need to do is to open the wp-config.php file from your WordPress root folder (you may access this file from your WordPress installer folder). From the installation folder, the file is located at wordpress/wp-config.php

2. Insert FS_METHOD

Paste the following code to your wp-config.php file, preferably just below every other line of code. define('FS_METHOD','direct'); FSmethod[1]

3. Save And Upload

When you have already pasted the one-line code, you can proceed to upload the file to your WordPress root folder on your server, and it should work right away. Uploading can be done directly from your host control panel.

Stay up on the latest on SEO and Digital Marketing

Why Choose SEO Werkz?

With a team of in-house experts culled from many different specializations, SEO Werkz has all the experience and knowledge needed to improve the performance of your website. Combine that level of expertise with SEO Werkz’s own suite of proprietary tools, techniques, and processes, and you have all the ingredients necessary for success today.

Whatever your consulting or analysis needs are, SEO Werkz will exceed your expectations. We’ll deliver expert analyses, reports & consulting that are of the highest quality in the industry and that are communicated to you in a clear, straightforward manner.

Want to Learn More?

Not sure what you need? Let us help.
Get Started
SEO Werkz is a full-service Internet marketing and Search Engine Optimization (SEO) services company offering results-driven services and exceptional customer support. Our web marketing services include Social Media, Link Building, Local Search, PPC, Content Creation, Web Design, and Retargeting.
chevron-down linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram