Announcement

Collapse
No announcement yet.

Wordpress permission errors

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Wordpress permission errors

    I've just migrated some Wordpress sites to my new VPS account. I imported the SQL data and used tar.gz files to transfer the files.

    The sites work fine. I can create and edit posts.

    However when I try to upload new media I get permission errors.

    Code:
    “logo.gif” has failed to upload due to an error
    The uploaded file could not be moved to /home/myusername/public_html/MySite/wp-content/uploads/2013/05
    (I've changed the account username and site directory in the example above).

    If I look at my Wordpress files they are owned by "myusername" with permissions 755. So it appears Wordpress doesn't have permission to move the uploaded file into the correct directory. If the directories don't exist it can't create them either.

    How can I get Wordpress the permissions it needs? As far as I am aware the site is setup exactly as it was in my Shared hosting account where I moved it from.

  • #2
    Wordpress permission errors

    I've just migrated some Wordpress sites from a Shared hosting account to my new VPS account. I transferred the MySQL databases and the Wordpress files. The sites load and operate fine but media uploading is broken.

    Permissions errors prevent me uploading any new media. Wordpress can't create new directories or add new files.

    Code:
    “logo.gif” has failed to upload due to an error
    The uploaded file could not be moved to /home/123456/public_html/MySite/wp-content/uploads/2013/05.
    (I've changed the username and site directory in the example above.)

    The files are owned by 123456:123456 and I assume that the user PHP is using doesn't have permission to create or edit files.

    What can I do to fix this problem?

    Comment


    • #3
      Re: Wordpress permission errors

      Originally posted by MattHawkins View Post
      I've just migrated some Wordpress sites to my new VPS account. I imported the SQL data and used tar.gz files to transfer the files.

      The sites work fine. I can create and edit posts.

      However when I try to upload new media I get permission errors.

      Code:
      “logo.gif” has failed to upload due to an error
      The uploaded file could not be moved to /home/myusername/public_html/MySite/wp-content/uploads/2013/05
      (I've changed the account username and site directory in the example above).

      If I look at my Wordpress files they are owned by "myusername" with permissions 755. So it appears Wordpress doesn't have permission to move the uploaded file into the correct directory. If the directories don't exist it can't create them either.

      How can I get Wordpress the permissions it needs? As far as I am aware the site is setup exactly as it was in my Shared hosting account where I moved it from.
      Originally posted by MattHawkins View Post
      I've just migrated some Wordpress sites from a Shared hosting account to my new VPS account. I transferred the MySQL databases and the Wordpress files. The sites load and operate fine but media uploading is broken.

      Permissions errors prevent me uploading any new media. Wordpress can't create new directories or add new files.

      Code:
      “logo.gif” has failed to upload due to an error
      The uploaded file could not be moved to /home/123456/public_html/MySite/wp-content/uploads/2013/05.
      (I've changed the username and site directory in the example above.)

      The files are owned by 123456:123456 and I assume that the user PHP is using doesn't have permission to create or edit files.

      What can I do to fix this problem?
      Hi Matt,

      Do you've SuPHP environment enabled for PHP on your VM? You need to give 777 perms on the 'uploads' directory if you aren't using SuPHP secure environment. Let us know the exact directory/path/site/VM details & we'll assist you in getting this working...
      Rock _a.k.a._ Jack Daniel

      Follow eUKhost on Twitter || Join eUKhost Community on Facebook

      Comment


      • #4
        Re: Wordpress permission errors

        Hi Rock,

        Thanks for the reply. Sorry for the duplicated post!

        I did some research today and realised that I need to change my PHP handler to SuPHP. I've found the configuration setting in "Configure PHP and suEXEC" to switch from DSO to SuPHP.

        So the question is can I just change this setting and click "Save New Configuration" or are there other settings to adjust?

        Matt

        Comment


        • #5
          Re: Wordpress permission errors

          Originally posted by MattHawkins View Post
          Hi Rock,

          So the question is can I just change this setting and click "Save New Configuration" or are there other settings to adjust?
          Hi Matt !

          Yep. Do switch the PHP 5 Handler from DSO to SuPHP and then click on "Save New Configuration" button.

          If your account contains files and folders having permission as 777 then you should change them to 644 and 755 [ files and folders respectively] and if the ownership is set to nobody.nobody then change it to user.user. Then make sure that .htaccess file
          doesn't include php_value/php_flag/php_admin directives. Just comment out if you find any of these. That's all.

          You can also contact our technical support via live chat or ticketing system, so we will get that done for you.
          Regards,
          Kieran A.
          Cloud Administrator
          Skype :: Kieran.Alen | eUKhost

          Comment

          Working...
          X