How to update WordPress with SELinux enabled

What is SELinux?

Start Hacking SELinux

$ sudo chown nginx:nginx -R /path/to/wordpress
$ sudo find /path/to/wordpress -type f -exec chmod 0644 {} \;$ sudo find /path/to/wordpress -type d -exec chmod 0755 {} \;
$ ls -Z
drwxr-xr-x. nginx nginx system_u:object_r:httpd_sys_content_t:s0 wordpress
$ sudo chcon -t httpd_sys_content_t /path/to/wordpress -R
$ sudo chcon -t httpd_sys_rw_content_t /path/to/wordpress/wp-config.php$ sudo chcon -t httpd_sys_rw_content_t /path/to/wordpress/wp-content -R
$ sudo chcon -t httpd_sys_rw_content_t /path/to/wordpress/nginx.conf

Troubleshooting

define('FS_METHOD', 'direct');

--

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

⚡️ A Roobee update & new info about the use of ROOBEE on the platform!

How to install operating system on Raspberry Pi

A 5 minutes guide to Transactional Processing

How to make a Dockerfile for a Python Script?

Day 9, CoreProgramming-1

Using Swift 3 on RaspberryPi — Beginning

Connect to Cassandra with Python 3.x and get Pandas Dataframe

Re-Learning Data Structures and Algorithms Series 🧑🏾‍💻: Python 3 + Classes

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Daryl Ng

Daryl Ng

More from Medium

How to install Apache2 Web Server to Ubuntu 18.04 using Terminal on an M1 MacBook Pro.

Running a bash script in a one-shot Ubuntu custom container on Windows

Https on localhost

Achieve auto-restart mechanism for Nifi with Docker