Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


[HELP] Wordpress, unable to install, remove or upload any images...
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

[HELP] Wordpress, unable to install, remove or upload any images...

thammy321thammy321 Member
edited May 2018 in Help

Hi, yesterday i've moved my Wordpress site from Shared Hosting to VPS, but after i logged in, i was unable to install, remove or upload any images. I always get:

Update Failed: Could not create directory.

**The uploaded file could not be moved to wp-content/uploads/2018/05.

Installation failed: Could not create directory.

I have tried multiple tutorials how to fix this.**

Some links i've tried:

https://www.tipsandtricks-hq.com/how-to-fix-the-unable-to-create-directory-error-in-wordpress-5264

https://www.quora.com/Whenever-I-try-to-update-the-WordPress-or-plugins-it-shows-Update-Failed-Could-not-Create-Directory-any-working-solution

https://www.admfactory.com/installation-failed-could-not-create-directory-in-wordpress/

Please somebody help me, i'd legit pay to get this fixed.

Thanks a lot

«1

Comments

  • vovlervovler Member

    Seems like an issue related to wrong permissions

    Thanked by 1kkrajk
  • @vovler said:
    Seems like an issue related to wrong permissions

    I think so, but i've tried to change permissions to everything. 755, 777 but nothing actually works :(

  • YmpkerYmpker Member

    @thammy321 said:

    @vovler said:
    Seems like an issue related to wrong permissions

    I think so, but i've tried to change permissions to everything. 755, 777 but nothing actually works :(

    Have you tried settinf these permissions recursively?

    Thanked by 1Lee
  • noamannoaman Member

    @thammy321 said:
    Hi, yesterday i've moved my Wordpress site from Shared Hosting to VPS, but after i logged in, i was unable to install, remove or upload any images. I always get:

    Update Failed: Could not create directory.

    **The uploaded file could not be moved to wp-content/uploads/2018/05.

    Installation failed: Could not create directory.

    I have tried multiple tutorials how to fix this.**

    Some links i've tried:

    https://www.tipsandtricks-hq.com/how-to-fix-the-unable-to-create-directory-error-in-wordpress-5264

    https://www.quora.com/Whenever-I-try-to-update-the-WordPress-or-plugins-it-shows-Update-Failed-Could-not-Create-Directory-any-working-solution

    https://www.admfactory.com/installation-failed-could-not-create-directory-in-wordpress/

    Please somebody help me, i'd legit pay to get this fixed.

    Thanks a lot

    It should be an easy fix

    if apache then you need to use chown command to giver proper permissions to www-data user

    Cloudflare won't let me post the exact command here

  • noaman said: It should be an easy fix

    if apache then you need to use chown command to giver proper permissions to www-data user

    Cloudflare won't let me post the exact command here

    my WP is in different directory. /home/admin/web/DOMAIN/public_html/wp/

  • vovlervovler Member

    @thammy321 said:

    noaman said: It should be an easy fix

    if apache then you need to use chown command to giver proper permissions to www-data user

    Cloudflare won't let me post the exact command here

    my WP is in different directory. /home/admin/web/DOMAIN/public_html/wp/

    Ok, you got youself a VPS and what exactly are you running? Apache? Nginx? OpenLiteSpeed?

    If you don't know much about VPS's go with something that installs everything in one go: EasyEngine or CentminMod or CyberPanel

  • vovler said: Ok, you got youself a VPS and what exactly are you running? Apache? Nginx? OpenLiteSpeed?

    If you don't know much about VPS's go with something that installs everything in one go: EasyEngine or CentminMod or CyberPanel

    I've bought VPS from HostSolutions, the $5 for 3months LED deal. My friend has setup everything for me, i believe it's running apache. On CentOS 6.9.

    Basically i have Wordpress installed in /wp/ directory.

    public_html > my HTML site here > /wp/ Wordpress site here

    domain.com is plain HTML, domain.com/wp/ is Wordpress.

  • FalzoFalzo Member

    @thammy321 said:

    my WP is in different directory. /home/admin/web/DOMAIN/public_html/wp/

    from the looks of it, that's VestaCP and the domain/content is put directly under the admin user which on top is able to sudo and access all vesta shell scripts.
    the content most likely was then uploaded/synced as another user, probably just using root with plain password via port 22 ...

    next up: my VPS got suspended for sending out DDOS while my Wordpress wasn't even running yet - let's blame the provider.

    sorry to say, but seems like there simply is not any knowledge on how to manage an unmanaged VPS. so this whole thing isn't the brightest idea to say at least.

    TL;DR; stay with shared hosting as long as you haven't learned how to do basic linux administration.

    Thanked by 1vovler
  • vovlervovler Member

    @Falzo said:
    TL;DR; stay with shared hosting as long as you haven't learned how to do basic linux administration.

    +1

    Thanked by 1kkrajk
  • Falzo said: TL;DR; stay with shared hosting as long as you haven't learned how to do basic linux administration.

    I was with shared hosting for a long time, but now i'm gettig over 1M traffic monthly (plain HTML). My shared hosting cannot handle this.

    Thanked by 1kkrajk
  • deankdeank Member, Troll
    edited May 2018

    Then you should get managed VPS. You are paying the lowest of low for a hosting account while you are getting healthy traffic.

    Reminds me of those who scream that they are losing millions when their 1 dollar VPS is down.

    Thanked by 1kkrajk
  • deank said: Then you should get managed VPS. You are paying the lowest of low for a hosting account while you are getting healthy traffic.

    Reminds me of those who scream that they are losing millions when their 1 dollar VPS is down.

    So, it's not possible to fix my issue?

  • deankdeank Member, Troll

    Possible to fix the issue. Then what? You are gonna run into more issues.

    You can't keep expecting some random dudes on the internet to keep fixing your issues. It's not a marriage.

  • deank said: Possible to fix the issue. Then what? You are gonna run into more issues.

    You can't keep expecting some random dudes on the internet to keep fixing your issues. It's not a marriage.

    I understand. I'm stuck now basically. I'll just use shared hosting for now. The Hostsolutions VPS was just to try things out, how many people can Wordpress VPS handle. Since Shared hosting for wordpress can only handle 1,5k traffic at once.

  • deankdeank Member, Troll

    Like I said you can get managed VPS. Do expect to pay substantially more.

    Or mess around with the VPS you have in hand and learn.

    Thanked by 1Falzo
  • elliotcelliotc Member

    Learn openvz. KVM is a much better learning environment.

  • jsgjsg Member, Resident Benchmarker
    edited May 2018

    @thammy321

    You must provide more information to make it easier to help you.

    Based on what l can guess you must find out as which user your web server runs. Usually web servers run as www or www-data or similar.

    Next you must make that user the owner of /path/to/your/public_html like so 'chown -R www /your/path/public_html' where 'www' stands for the user I talked about. Finally you should also restart the server. Typically like so 'service apache restart'.

    P.S. I had to delete part of my advice because +$%#!! Cloudflare took a normal innocent linux command as an attack.

    Thanked by 1thammy321
  • thammy321thammy321 Member
    edited May 2018

    jsg said: Next you must make that user the owner of /path/to/your/public_html like so 'chown -R www /your/path/public_html' where 'www' stands for the user I talked about. Finally you should also restart the server. Typically like so 'service apache restart'.

    "chown: invalid user: `www'"

    Looks like its different user

    p.s. this was my command: chown -R www /home/admin/web/domain.com/public_html/wp/

  • thammy321thammy321 Member
    edited May 2018

    UPDATE!

    ISSUE FIXED.

    chown -R admin /home/admin/web/domain.com/public_html/wp/

    worked. Thanks to everyone for help

  • deankdeank Member, Troll

    The end has been averted, for now.

  • should be www-data, not just www

  • jsgjsg Member, Resident Benchmarker

    Side note: I had written down a simple command that would show you the probable user but that's the part I had to delete due to Cloudflares "security" concerns.

    Thanked by 1thammy321
  • FalzoFalzo Member
    edited May 2018

    @thammy321 said:
    UPDATE!

    ISSUE FIXED.

    chown -R admin /home/admin/web/domain.com/public_html/wp/

    worked. Thanks to everyone for help

    so now your wordpress script files belong to user admin and group root, don't bother any further, because it worked

    you should now go and check the performance of your doings by running a simple bench script like @FlamesRunnner suggest in his signature (simply copy and paste this command into your shell ):

    wget https://andrew-hong.me/dl/bench.sh && bash bench.sh
  • ahmiqahmiq Member

    I had similar problem a while ago where i could not upload new images to the wordpress.

    the problem was with wrong permissions of the tmp folder.

  • vovlervovler Member

    @thammy321 said:
    UPDATE!

    ISSUE FIXED.

    chown -R admin /home/admin/web/domain.com/public_html/wp/

    worked. Thanks to everyone for help

    That is not the best solution... admin rights on all wordpress files....

  • jvnadrjvnadr Member

    vovler said: That is not the best solution... admin rights on all wordpress files....

    If he has installed Vesta, admin is not the root user but the default user of the panel itself. So, it is pretty safe to chmod the files as admin, because the only thing admin has access to, is the administration of the panel.

    Thanked by 1Junkless
  • @Falzo

    Ahem, please use the updated link in my sig because the other system is currently down :)

    Thanked by 1Falzo
  • jvnadr said: If he has installed Vesta, admin is not the root user but the default user of the panel itself. So, it is pretty safe to chmod the files as admin, because the only thing admin has access to, is the administration of the panel.

    i have Vesta. yes.

  • FlamesRunner said: Ahem, please use the updated link in my sig because the other system is currently down :)

  • @thammy321

    Gotta run it too :)

    bash bench.sh

    Thanked by 1Aidan
Sign In or Register to comment.