私はからの指示に従っています
新しいプラグインを更新またはインストールしようとするたびに、次のようなエラーメッセージが表示されます。
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.
/var/www/html
を次のように設定しました。
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
私が試してみました
define('WP_CONTENT_DIR', '/var/www/html/wp-content');
を/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
は成功しますSudo -u www-data touch /var/www/html/wp-content/test
は成功しますシステム情報:
$ 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
あなたはWordPress用のUbuntuパッケージを使用していますか?通常のインストール(公式のWPアーカイブをダウンロードしてLAMPでセットアップ)を試してみましたか?
それはあまり「Linuxの方法」ではないかもしれませんが、WordPressのためにそれに固執することが一般的に推奨されます。私は過去にUbuntu WPパッケージについて簡単に説明しましたが、結局それもしました。
PSその3.8.2がWP versionの略語であれば、それも最新のものではありません。
UbuntuサーバーにWordPressディレクトリを作成するには、var/www/
とそのSudo mkdir -p mysite.com/public_html && Sudo chown -R user_name:www-data /var/www
にいる必要があります。
その後ls
すると、次のようになるはずです。
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