<?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>Directory Permission issue in wordpress &#8211; Learn PHP online</title>
	<atom:link href="https://www.learnphponline.in/tag/directory-permission-issue-in-wordpress/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>Fri, 05 Feb 2021 12:21:39 +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>How to fix Unable to Update WordPress to Latest version ( File Permission or Directory issue)</title>
		<link>https://www.learnphponline.in/how-to-fix-unable-to-update-wordpress-to-latest-version/</link>
					<comments>https://www.learnphponline.in/how-to-fix-unable-to-update-wordpress-to-latest-version/#respond</comments>
		
		<dc:creator><![CDATA[Learn PHP online]]></dc:creator>
		<pubDate>Fri, 05 Feb 2021 11:48:56 +0000</pubDate>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Uncategorised]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Directory Permission issue in wordpress]]></category>
		<category><![CDATA[Fix the “Installation Failed: Could Not Create Directory"]]></category>
		<category><![CDATA[Unable to Update WordPress]]></category>
		<guid isPermaLink="false">https://www.learnphponline.in/?p=11925</guid>

					<description><![CDATA[<p>Unable to Update WordPress to Latest version ( File Permission or Directory issue) or How to Fix the “Installation Failed: Could Not Create Directory.” Error in WordPress: This error became a headache to me and I tried many solutions, some of them I already know and some of them, I read from...</p>
<p>The post <a rel="nofollow" href="https://www.learnphponline.in/how-to-fix-unable-to-update-wordpress-to-latest-version/">How to fix Unable to Update WordPress to Latest version ( File Permission or Directory issue)</a> appeared first on <a rel="nofollow" href="https://www.learnphponline.in">Learn PHP online</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>Unable to Update WordPress to Latest version ( File Permission or Directory issue) or How to Fix the “Installation Failed: Could Not Create Directory.” Error in WordPress:</strong> This error became a headache to me and I tried many solutions, some of them I already know and some of them, I read from StackOverflow, medium.com, and many other websites about the server commands and other things. But I got nothing from the last 3 days. Do you imagine my pain of upgrading WordPress and failed continuously for 3 days?</p>
<p>&nbsp;</p>
<p>Updating WordPress is just a 20-second task and it takes me 3 days. so, finally, after so much research I got my solution and now I will share it with you.</p>
<h2 class="has-anchor-hash">Diagnosing the “<strong>Installation Failed: Could Not Create Directory</strong>.” Error in WordPress (2 Methods)</h2>
<p>The good news about this error is that it’s relatively easy to fix. Most of the time, correcting your permissions will clear everything right up. Before you start work on that solution, however, you may want to make sure that it can actually solve your problem.</p>
<p>Below, we’ve outlined two methods for determining whether your site is experiencing a permissions-related error.</p>
<ol>
<li class="has-anchor-hash">Use the WordPress Site Health Tool</li>
<li class="has-anchor-hash">Check Your Server’s Error Log</li>
</ol>
<p>&nbsp;</p>
<h2>So let&#8217;s discuss <strong>why this issue (Unable to Update WordPress) comes?</strong></h2>
<p>As I observed the issue very deeply and I found a few main issues are given  below:</p>
<ol>
<li><strong>WordPress files or directory is missing</strong>. You can download WordPress manually and add the missing file or replace the whole directory.</li>
<li><strong>WordPress files or directory permission</strong> should not be as per guidelines. you can download <a href="https://wordpress.org/plugins/all-in-one-wp-security-and-firewall/">WP Security Plugin</a> and go to the file system security page to check files and directory permissions.
<figure id="attachment_11926" aria-describedby="caption-attachment-11926" style="width: 471px" class="wp-caption aligncenter"><img fetchpriority="high" decoding="async" class=" wp-image-11926" src="https://www.learnphponline.in/wp-content/uploads/2021/02/Capture.jpg" alt="WP security plugin to fix files permission in wordpress" width="471" height="215" srcset="https://www.learnphponline.in/wp-content/uploads/2021/02/Capture.jpg 1862w, https://www.learnphponline.in/wp-content/uploads/2021/02/Capture-300x137.jpg 300w, https://www.learnphponline.in/wp-content/uploads/2021/02/Capture-1024x469.jpg 1024w, https://www.learnphponline.in/wp-content/uploads/2021/02/Capture-768x351.jpg 768w, https://www.learnphponline.in/wp-content/uploads/2021/02/Capture-1536x703.jpg 1536w" sizes="(max-width: 471px) 100vw, 471px" /><figcaption id="caption-attachment-11926" class="wp-caption-text">WP security plugin to fix files permission in WordPress</figcaption></figure></li>
<li>if you tried both methods given above then definitely you are using <strong>Dedicated Linux Server (Redhat, Centos, or any other). </strong>So in this case you need to update your directory user and its group. <span style="color: #ff0000;">sudo chown -R apache:apache /path/to/WordPress.</span></li>
</ol>
<p>&nbsp;</p>
<p>This command will help you. for Linux servers, you can use this command as given below.</p>
<blockquote><p>sudo chown -R apache:apache /var/www/html/WordPress</p></blockquote>
<p>Here, the <strong>WordPress</strong> means your directory if your WordPress is in the main directory then remove the &#8220;WordPress&#8221; word from the end. this will update your user and group from <strong>root</strong> to <strong>apache. </strong>after this command, you can check file and directory status by <span style="color: #ff0000;">ls -l </span> command.</p>
<p><img decoding="async" class=" wp-image-11927 aligncenter" src="https://www.learnphponline.in/wp-content/uploads/2021/02/Capture2.jpg" alt="" width="483" height="261" srcset="https://www.learnphponline.in/wp-content/uploads/2021/02/Capture2.jpg 1390w, https://www.learnphponline.in/wp-content/uploads/2021/02/Capture2-300x162.jpg 300w, https://www.learnphponline.in/wp-content/uploads/2021/02/Capture2-1024x554.jpg 1024w, https://www.learnphponline.in/wp-content/uploads/2021/02/Capture2-768x415.jpg 768w" sizes="(max-width: 483px) 100vw, 483px" /></p>
<p>after this command now you can try again to update WordPress from your admin panel. if you again failed that means <strong>you have an issue as I had</strong>.</p>
<p>Errors on your WordPress site can slow down your work and create serious inconveniences for both you and your users. For instance, the “Installation failed: Could not create directory” message can prevent you from providing a key feature or functionality.</p>
<p>Now Please follow my steps very carefully and I am expecting that you tried all ways given above. So, Here you need to only 2 last commands for this problem.</p>
<h3>The final way to solve this issue &#8220;Unable to Update WordPress&#8221;:</h3>
<p><strong>Let’s get started! just enter the command given below to check your files. It&#8217;s again the &#8220;<span style="color: #ff0000;">Ls</span>&#8221; (Listing) command.</strong></p>
<blockquote>
<pre>ls -Z /var/www/html/path_to_your_website_folder/
</pre>
</blockquote>
<p>After this command, you will get the result given below. if you saw the same something is this. that means your user and group is apache: apache.</p>
<figure id="attachment_11928" aria-describedby="caption-attachment-11928" style="width: 508px" class="wp-caption aligncenter"><img decoding="async" class="wp-image-11928" title="Unable to Update WordPress to Latest version" src="https://www.learnphponline.in/wp-content/uploads/2021/02/2DoMdK.png" alt="Unable to Update WordPress to Latest version" width="508" height="242" srcset="https://www.learnphponline.in/wp-content/uploads/2021/02/2DoMdK.png 757w, https://www.learnphponline.in/wp-content/uploads/2021/02/2DoMdK-300x143.png 300w" sizes="(max-width: 508px) 100vw, 508px" /><figcaption id="caption-attachment-11928" class="wp-caption-text">Command Result in Terminal</figcaption></figure>
<p>&nbsp;</p>
<p><strong>Now step 2  is run the command again given below:</strong></p>
<blockquote>
<pre>chcon -R --type httpd_sys_rw_content_t /var/www/html/rr/path_to_your_website_folder/
</pre>
</blockquote>
<figure id="attachment_11929" aria-describedby="caption-attachment-11929" style="width: 542px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="Unable to Update WordPress to Latest version wp-image-11929" title="Unable to Update WordPress to Latest version" src="https://www.learnphponline.in/wp-content/uploads/2021/02/NuqhdG.png" alt="Unable to Update WordPress to Latest version" width="542" height="267" srcset="https://www.learnphponline.in/wp-content/uploads/2021/02/NuqhdG.png 753w, https://www.learnphponline.in/wp-content/uploads/2021/02/NuqhdG-300x148.png 300w" sizes="(max-width: 542px) 100vw, 542px" /><figcaption id="caption-attachment-11929" class="wp-caption-text">Command results in Terminal</figcaption></figure>
<p>So, After this command, your WordPress will upgrade to the latest version. I hope my blog will be helpful to you. Please share this on social media so it will rank high for others. You can also read about,<a href="https://www.learnphponline.in/make-money-without-investment-in-india/"> How to earn money with any investment. </a>and <a href="https://www.learnphponline.in/programing-language-for-freelancing/">Top freelancing languages.</a></p>
<p>&nbsp;</p>
<h2>Summary for Unable to update WordPress to the latest version.</h2>
<p>Here, sometimes Linux terminals without full knowledge will be tough for any developer. So, I recommend getting some knowledge about Linux basic commands in your free time. WordPress has many security loops and I personally recommend you to make your WordPress website secure with security plugins like <a href="https://www.wordfence.com/">Wordfenece</a> or <a href="https://wordpress.org/plugins/all-in-one-wp-security-and-firewall/">WP security.</a></p>
<div class="pvc_clear"></div>
<p id="pvc_stats_11925" class="pvc_stats all  " data-element-id="11925" 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 loading="lazy" 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/how-to-fix-unable-to-update-wordpress-to-latest-version/">How to fix Unable to Update WordPress to Latest version ( File Permission or Directory issue)</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/how-to-fix-unable-to-update-wordpress-to-latest-version/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
