The さくらの VPS trial period ended on December 2nd. But I continue to use because I have some other things I want to challenge. Maybe I’ll pay monthly charge once or more.
I’ll write “How to install WordPress”. If you do, you must finish First VPS #1, First VPS #2 and First VPS #3 as the prerequisites, of course. First, I install a WordPress as a Wheel Group User (Mine is centos), i.e like a root user.
Note) ||SELinux and WordPress|| (See httpd_selinux(8))
sudo setsebool -P httpd_can_network_connect onsudo setsebool -P httpd_anon_write onsudo semanage fcontext -a -t public_content_rw_t
"/path/to/wp-content/uploads(/.*)?"sudo /sbin/restorecon -RF /path/to/wp-content/uploads Ref URL: 5.6.2. Persistent Changes: semanage fcontext
This says ‘restorecon -R’ works but I needed ‘restorecon -RF’ to change the type of the directory though I don’t know why.
||How to install WordPress as a Wheel Group User||
——————–
mkdir tmpchmod 707 tmp The tmp folder is for download files.
cd tmpsudo yum install wgetwget https://wordpress.org/latest.tar.gztar xzvf latest.tar.gzrsync -avP ~/tmp/wordpress/ ~/www/html/wp/mkdir ~/www/html/wp/wp-content/uploadschmod 707 uploadssudo semanage fcontext -a -t public_content_rw_t
"/home/centos/www/html/wp/wp-content/uploads(/.*)?"sudo /sbin/restorecon -RF /home/centos/www/html/wp/wp-content/uploads——————–
define('FTP_USER', 'username');define('FTP_PASS', 'password');define('FTP_HOST', 'VPS_DomainName');
My PHP is running as a DSO (Apache 2.0 Handler). After the configurations above, the environment gives me ‘centos:centos’ as the owner:group about the upgrading WordPress files but it gives ‘apache:apache’ about the media files which were uploaded from Dashboard. So, by FTP client software I cannot modify the media files though I can back them up because of the user ‘centos‘. And I can change the owner:group by ‘chown’ command via SSH.
This matter gives bigger problems when a person use a normal User. Next I’ll write an installation as a normal user.
||How to install WordPress as a normal User||
Of course you cannot do Server-side works as a normal user. It requires your login user has administrative privileges like my centos.
sudo adduser normuser1sudo passwd normuser1sudo chmod 701 /home/normuser1sudo vi /etc/httpd/conf.d/userdir.conf Ref URL: UserDir Directive UserDir enabled normuser1 after the line UserDir disabledUserDir www/html after the line #UserDir public_html<Directory "/home/*/public_html"><Directory "/home/*/www/html">Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExecOptions MultiViews SymLinksIfOwnerMatch IncludesNoExecsu - normuser1mkdir wwwcd wwwmkdir htmlid -a normuser1exitsudo systemctl restart httpd.servicesudo gpasswd -a sennari apacheid -a normuser1define('FTP_USER', 'username');define('FTP_PASS', 'password');define('FTP_HOST', 'VPS_DomainName');After the steps above, I upgraded WordPress 4.0 to 4.1. It successfully ended. But I could not uploaded media files in spite I had made a uploads folder with its permission 707. So, I did the followings.
sudo chown -R normuser1:apache
/home/normuser1/www/html/wp/wp-content/uploadssudo semanage fcontext -a -t public_content_rw_t
"/home/normuser1/www/html/wp/wp-content/uploads(/.*)?"sudo restorecon -RF /home/sennari/www/html/wp/wp-content/uploads Now I have a question. Why does WordPress use different methods about upgrades and media uploads? If it use the method of upgrades for media file uploads, the troubles probably do not occur. Though I don’t realize as I don’t know much about PHP, does the same method for both make something wrong?
Anyway, I’ll try suEXEC Support.
The laptop mentioned previous article successfully became 24H2. The touchpad was risen because the battery…
I had a cheap laptop from Amazon and had used it to watch streaming programs…
The recipe for sweet potato yōkan that I often made this fall. Ingredients Sweet potato…
After a long time, when I checked broken links and fixed them, I got an…
I made a box, so I prepare the contents. Theme and Plugins. The theme is…
Hehe, it's been almost a year since my last post. I received a notification email…
This website uses cookies.