<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>WordPress asking for FTP credentials to install or delete plugins &#8211; Learn PHP online</title>
	<atom:link href="https://www.learnphponline.in/tag/wordpress-asking-for-ftp-credentials-to-install-or-delete-plugins/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.learnphponline.in</link>
	<description>The Best Free Tutorials of Programming Languages in 2019</description>
	<lastBuildDate>Sat, 13 Mar 2021 08:00:17 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.6.3</generator>
	<item>
		<title>WordPress asking for FTP credentials to install or delete plugins</title>
		<link>https://www.learnphponline.in/wordpress-asking-for-ftp-credentials-to-install-or-delete-plugins/</link>
					<comments>https://www.learnphponline.in/wordpress-asking-for-ftp-credentials-to-install-or-delete-plugins/#respond</comments>
		
		<dc:creator><![CDATA[Learn PHP online]]></dc:creator>
		<pubDate>Sat, 13 Mar 2021 07:57:51 +0000</pubDate>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[WordPress asking for FTP credentials]]></category>
		<category><![CDATA[WordPress asking for FTP credentials to install or delete plugins]]></category>
		<guid isPermaLink="false">https://www.learnphponline.in/?p=12036</guid>

					<description><![CDATA[<p>Here I have a solution for &#8220;WordPress asking for FTP credentials to install a plugin or delete a plugin&#8221;.  it&#8217;s a very common issue in WordPress and you can solve this by simply following the few steps given below. But before solving this issue, you need to know about WordPress FS_Method. Read...</p>
<p>The post <a rel="nofollow" href="https://www.learnphponline.in/wordpress-asking-for-ftp-credentials-to-install-or-delete-plugins/">WordPress asking for FTP credentials to install or delete plugins</a> appeared first on <a rel="nofollow" href="https://www.learnphponline.in">Learn PHP online</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Here I have a solution for<strong> &#8220;WordPress asking for FTP credentials to install a plugin or delete a plugin&#8221;.</strong>  it&#8217;s a very common issue in WordPress and you can solve this by simply following the few steps given below. But before solving this issue, you need to know about WordPress <strong>FS_Method. </strong>Read more about FS_method on <a href="https://wordpress.org/support/topic/php-notice-constant-fs_method-already-defined-in-wp-config-php/">WordPress docs</a>.</p>
<h2><strong>The solution for &#8220;WordPress asking for FTP credentials to install a plugin or delete a plugin&#8221; is:</strong></h2>
<p><strong>step1: </strong>you need to the WordPress home directory and find the wp-config.php file.</p>
<figure id="attachment_12037" aria-describedby="caption-attachment-12037" style="width: 783px" class="wp-caption aligncenter"><img fetchpriority="high" decoding="async" class="wp-image-12037" title="WordPress asking for FTP credentials to install or delete plugins" src="https://www.learnphponline.in/wp-content/uploads/2021/03/tempsnip.png" alt="WordPress asking for FTP credentials to install or delete plugins" width="783" height="401" srcset="https://www.learnphponline.in/wp-content/uploads/2021/03/tempsnip.png 1476w, https://www.learnphponline.in/wp-content/uploads/2021/03/tempsnip-300x154.png 300w, https://www.learnphponline.in/wp-content/uploads/2021/03/tempsnip-1024x525.png 1024w, https://www.learnphponline.in/wp-content/uploads/2021/03/tempsnip-768x394.png 768w" sizes="(max-width: 783px) 100vw, 783px" /><figcaption id="caption-attachment-12037" class="wp-caption-text">WordPress asking for FTP credentials to install or delete plugins</figcaption></figure>
<p>&nbsp;</p>
<p>Step2: Open the wp-config.php file add <code>define('FS_METHOD', 'direct' );</code>. After adding this line and now save the file and check again by installing plugins.</p>
<figure id="attachment_12038" aria-describedby="caption-attachment-12038" style="width: 749px" class="wp-caption aligncenter"><img decoding="async" class="wp-image-12038 size-full" title="WordPress asking for FTP credentials to install or delete plugins" src="https://www.learnphponline.in/wp-content/uploads/2021/03/worpdress-FS_method.jpg" alt="WordPress asking for FTP credentials to install or delete plugins" width="749" height="98" srcset="https://www.learnphponline.in/wp-content/uploads/2021/03/worpdress-FS_method.jpg 749w, https://www.learnphponline.in/wp-content/uploads/2021/03/worpdress-FS_method-300x39.jpg 300w" sizes="(max-width: 749px) 100vw, 749px" /><figcaption id="caption-attachment-12038" class="wp-caption-text">WordPress asking for FTP credentials to install a plugin or delete a plugin</figcaption></figure>
<p>&nbsp;</p>
<h2>why use <code>FS_METHOD = 'direct'</code>?</h2>
<p>Unfortunately, WordPress&#8217;s logic for detecting an at-risk environment is flawed and produces both false-positives and false-negatives. Whoops. The test involves creating a file and making sure it belongs to the same owner as of the directory it lives in. The assumption is that if the users are the same, PHP is running as your own account and it&#8217;s safe to install plugins as that account. If they&#8217;re different, WordPress assumes that PHP is running as a shared account and it&#8217;s not safe to install plugins as that account. Unfortunately, both of these assumptions are educated guesses that will frequently be wrong.</p>
<p>You would use <code>define('FS_METHOD', 'direct' );</code> in a false positive scenario such as this one: you are part of a trusted team whose members all upload files through their own account. PHP runs as its own separate user. WordPress will assume that this is an at-risk environment and will not default to <strong>&#8216;direct&#8217;</strong> mode. In reality, it&#8217;s only shared with users you trust, and as such <code>'direct'</code> mode is safe. In this case, you should use <strong>define(&#8216;FS_METHOD&#8217;, &#8216;direct&#8217;)</strong> to force WordPress to write files directly.</p>
<p>&nbsp;</p>
<h2>What&#8217;s the risk?</h2>
<p>On a poorly configured shared host, every customer&#8217;s PHP will execute as the same user (let&#8217;s say apache for discussion). This setup is surprisingly common.</p>
<p>If you&#8217;re on such a host and use WordPress to install the plugin using direct file access, all of your plugin files will belong to apache. A legitimate user on the same server would be able to attack you by writing a PHP script that injects evil code into your plugin files. They upload their script to their own website and request its URL. Your code is successfully compromised because their script runs as apache, the same one that owns your plugin files.</p>
<p>Also Read, <a href="https://www.learnphponline.in/seo-guide/">How to earn money via blogging.</a></p>
<div class="pvc_clear"></div>
<p id="pvc_stats_12036" class="pvc_stats all  " data-element-id="12036" style=""><i class="pvc-stats-icon medium" aria-hidden="true"><svg aria-hidden="true" focusable="false" data-prefix="far" data-icon="chart-bar" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="svg-inline--fa fa-chart-bar fa-w-16 fa-2x"><path fill="currentColor" d="M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z" class=""></path></svg></i> <img decoding="async" width="16" height="16" alt="Loading" src="https://www.learnphponline.in/wp-content/plugins/page-views-count/ajax-loader-2x.gif" border=0 /></p>
<div class="pvc_clear"></div>
<p>The post <a rel="nofollow" href="https://www.learnphponline.in/wordpress-asking-for-ftp-credentials-to-install-or-delete-plugins/">WordPress asking for FTP credentials to install or delete plugins</a> appeared first on <a rel="nofollow" href="https://www.learnphponline.in">Learn PHP online</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.learnphponline.in/wordpress-asking-for-ftp-credentials-to-install-or-delete-plugins/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
