Ticker

6/recent/ticker-posts

Header Ads Widget

Shared Hosting with Namecheap. Free .Website domain & WhoisGuard

How To update Wordpress Without using FTP

Mostly in fresh installation cases, we face an issue that when we try to update wordpress or plugins or themes, it redirects to the screen with a message that "wordpress needs to access your webserver" and we are asked to enter the FTP details to update the server.

If you are using a shared hosting, its pretty easy to enter the ftp details and you may be able to update. But for users who are on VPS, they generally tend to use SSH instead of password and they cant upload the keyfile on wordpress.

So lets see how we can make some changes to our config.php file and update the wordpress right from the dashboard.

Step 1: Login to your FTP using filezilla or any other ftp client and download a copy of your config.php file. Keep this copy of config.php safe in case you may need to restore.

Step 2: Right click your config.php file and click View/Edit.

Step 3: Add the following code in your config.php file.


/** Sets up 'direct' method for wordpress, auto update without ftp */
define('FS_METHOD','direct');

This code must be placed below the following code:

/** Sets up WordPress vars and included files. */
require_once(ABSPATH . 'wp-settings.php');

And your final code will look like as follows:


/** Sets up WordPress vars and included files. */
require_once(ABSPATH . 'wp-settings.php');

/** Sets up 'direct' method for wordpress, auto update without ftp */
define('FS_METHOD','direct');

Save the config.php file and upload it to the webserver.

You can now refresh the wordpress dashboard and try to update your wordpress or themes or plugins and you will be able to do so.

If you have any queries, feel free to ask in comments.

Post a Comment

0 Comments