Unable to locate WordPress Content directory (wp-content) Solution

Updating wordpress via Automatic upgrade is easy,fast and may be safe way to upgrade wordpress but in some hosting you may get errors like

Unable to locate WordPress Root directory.
Installation Failed

WordPress installed on Linux host have this problem (specially on shared server). This problem occurs in byethost hostings also. Since my website/blog was also installed in one of the byethost reseller. I also experience this problem, after searching for possible solutions in google, I found 2 solutions which I thought might solve my problem. 1st solution was to create another FTP account and redirect it to wordpress directory, since my host did not allow more that 1 ftp I was not able to do so, and I found it confusing as well.
Second solution was to edit “wp-config.php” file, I choosed 2nd option. All I did was, edited “wp-config.php” by adding this code at the end of line (at Line 79).

if(is_admin()) {
add_filter('filesystem_method', create_function('$a', 'return "direct";' ));
define( 'FS_CHMOD_DIR', 0751 );
}

After adding this code automatic upgrade and installation of plugins/theme worked perfectly and smoothly updated my blog in less than 10 second.

Pritush

Nepallica was started by Pritush and regularly updates this blog, beside Nepallica he also contributes to Nepalunderground.com. Connect with on Google+

7
Leave a Reply

avatar
3 Comment threads
4 Thread replies
0 Followers
 
Most reacted comment
Hottest comment thread
6 Comment authors
PretushtheaRaidXPritushJamius Sium Recent comment authors
  Subscribe  
newest oldest most voted
Notify of
subash chandra poudel
Guest
subash chandra poudel

Thanks for the infoz.

RaidX
Guest
RaidX

O.M.G, You rock it works on Freei.me spent over hour trying to hit my head on wall getting it working
Added your code and BOOM IT WORKED First time.

IF i could kiss you through my pc i would…

thea
Guest
thea

hi .. i do not see the wp-content.php file… where can i find it to add the code? thanks so much!

Pretush
Guest
Pretush

You have to add the code at the end of wp-config.php file

Bruness
Guest
Bruness

This works in perfection on the byethost hosting.
Thaks.

Jamius Sium
Guest
Jamius Sium

will it work on Freei.me

Pritush
Guest
Pritush

Yes it does, this site itself is hosted in freei.me .

Close Menu