2

I have followed the instructions from

Every time I try to update or install a new plugin, I get the following error:

Downloading update from https://downloads.wordpress.org/plugin/akismet.3.0.1.zip…
Unpacking the update…
An error occurred while updating Akismet: Could not create directory.
All updates have been completed.

I have set up /var/www/html with

sudo ln -s /usr/share/wordpress /var/www/html
sudo chown wp-user:www-data -RL /var/www
sudo chmod g+w -R /var/www

I have tried

  • Adding define('WP_CONTENT_DIR', '/var/www/html/wp-content'); to /etc/wordpress/config-my.host.php
  • sudo chmod o+w -R /var/www/html/wp-content
  • sudo -u wp-user touch /var/www/html/wp-content/test succeeds
  • sudo -u www-data touch /var/www/html/wp-content/test succeeds

System info:

$ cat /etc/*-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04 LTS"
NAME="Ubuntu"
VERSION="14.04, Trusty Tahr"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 14.04 LTS"
VERSION_ID="14.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
$ apt-show-versions wordpress apache2 php5 mysql-server
apache2:amd64/trusty 2.4.7-1ubuntu4 uptodate
mysql-server:all/trusty-security 5.5.37-0ubuntu0.14.04.1 uptodate
php5:all/trusty-security 5.5.9+dfsg-1ubuntu4.3 uptodate
wordpress:all/trusty 3.8.2+dfsg-1 uptodate
  • You are using Ubuntu package for WordPress right? Had you tried conventional install (just downloading official WP archive and setting it up with LAMP)? PS if that 3.8.2 stands for WP version it's not current either. – Rarst Jul 18 '14 at 21:39
  • @Rarst Weird! Downloading wordpress.org/latest.tar.gz and putting it at /var/www/html fixed the issue. Make your comment an answer and I'll accept it. – Jeffrey Jul 18 '14 at 22:00
1

You are using Ubuntu package for WordPress right? Had you tried conventional install (just downloading official WP archive and setting it up with LAMP)?

While it's not very "Linux way" maybe, it's commonly suggested to stick with that for WordPress. I briefly dealt with Ubuntu WP package in the past and ended up doing just that as well.

PS if that 3.8.2 stands for WP version it's not current either.

0

To create WordPress directory in Ubuntu server, you need to be in var/www/ and its sudo mkdir -p mysite.com/public_html && sudo chown -R user_name:www-data /var/www

When you ls afterwards, you should see something like this:

total 12
drwxrwxr-x 2 microurb www-data 4096 Dec 15 06:36 html
drwxrwxr-x 3 microurb www-data 4096 Sep 23  2017 microurb.com

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.