Question

when i try to add new plugins and themes in wordpress centos 7 getting error message

I successfully installed all component for my own web server. Centos7

when i try to add new plugins and themes getting error message

Error : Plugins list An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums. Try again

SELINUX=enforcing if Changes to **SELINUX=disabled ** all are working fine

and i dnt want to disable SELINUX

image kink >> http://s20.pixxxels.org/dn042stwt/Capture.4674567_PNG.png

this way i installed wordpress

adduser demo passwd demo gpasswd -a demo wheel

su - demo sudo yum clean all sudo yum update -y

sudo yum install httpd mariadb mariadb-server php php-common php-mysql php-gd php-xml php-mbstring php-mcrypt php-xmlrpc unzip wget -y

sudo systemctl start httpd sudo systemctl start mariadb sudo systemctl enable httpd sudo systemctl enable mariadb

sudo mysql_secure_installation << Press enter

Set root password? [Y/n] y

New password: <-- yourrootsqlpassword Re-enter new password: <-- yourrootsqlpassword

Remove anonymous users? [Y/n] y Disallow root login remotely? [Y/n] y Remove test database and access to it? [Y/n] y Reload privilege tables now? [Y/n] y

mysql -u root -p

MariaDB [(none)]>CREATE DATABASE wordpress; MariaDB [(none)]>GRANT ALL PRIVILEGES on wordpress.* to ‘user’@‘localhost’ identified by ‘password’; MariaDB [(none)]>FLUSH PRIVILEGES; MariaDB [(none)]>exit

wget http://wordpress.org/latest.tar.gz tar -xzvf latest.tar.gz

sudo cp -avr wordpress/* /var/www/html/ sudo restorecon -r /var/www/html

sudo mkdir /var/www/html/wp-content/uploads sudo chown -R apache:apache /var/www/html/ sudo chmod -R 755 /var/www/html/

cd /var/www/html/ sudo mv wp-config-sample.php wp-config.php sudo nano wp-config.php

define(‘DB_NAME’, ‘wordpress’); define(‘DB_USER’, ‘user’); define(‘DB_PASSWORD’, ‘password’);

sudo firewall-cmd --permanent --zone=public --add-service=http sudo firewall-cmd --permanent --zone=public --add-service=https sudo firewall-cmd --reload

please help me to rectify the add new theme plugin error with out disabling SELINUX


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

tried those still getting the same error … no perfect tutorial available to configuring SELinux policies for apache ? iam new here and dnt hve linux skills please any one help

@4vfunmetro

SELinux requires a little configuration and by default, will not allow Apache to write to files/directories. I’d recommend taking a look over the guide below as you’ll need to run a few commands to get things working properly while it’s enabled.

https://techblog.jeppson.org/2016/10/install-wordpress-centos-7/

Also:

http://fasterland.net/wordpress-updates-centos-7-apache-selinux.html