ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Permission issue with WP-CLI on Fedora 31

    Scheduled Pinned Locked Moved IT Discussion
    wordpresswp-clifedora 31fedorapermissions
    2 Posts 2 Posters 532 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • JaredBuschJ
      JaredBusch
      last edited by

      Setting up a new WordPress instance and I noticed this error when I downloaded core.

      [jbusch@lst-wp html]$ sudo -u apache wp core download
      [sudo] password for jbusch: 
      Downloading WordPress 5.3.2 (en_US)...
      Warning: Failed to create directory '/usr/share/httpd/.wp-cli/cache/': mkdir(): Permission denied.
      md5 hash verified: ec7fcc299de72d4914a688ea34c96f37
      Success: WordPress downloaded.
      

      So prior to setting up a site, you need to create the directory and give permission to apache

      # create a cache folder for wp-cli and give ownership to apache
      sudo mkdir -p /usr/share/httpd/.wp-cli/cache/
      sudo chown -R apache:apache /usr/share/httpd/.wp-cli/
      
      scottalanmillerS 1 Reply Last reply Reply Quote 1
      • scottalanmillerS
        scottalanmiller @JaredBusch
        last edited by

        @JaredBusch yeah, it's annoying that WP-CLI struggles with that.

        1 Reply Last reply Reply Quote 0
        • 1 / 1
        • First post
          Last post