Title: Installing WordPress on LAMP stack
Last modified: July 17, 2020

---

# Installing WordPress on LAMP stack

 *  [eddyferns](https://wordpress.org/support/users/eddyferns/)
 * (@eddyferns)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/installing-wordpress-on-lamp-stack/)
 * Hi,
 * Needed clarification on the following:
 * In order to install, run and update WordPress, themes and plugins should ownership
   be assigned to john:john or john:www-data or www-data:www-data while considering
   security issues?

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [5 years, 10 months ago](https://wordpress.org/support/topic/installing-wordpress-on-lamp-stack/#post-13136490)
 * They should be assigned to whatever user the PHP process is using. If you’re 
   using defaults, that’s probably apache:apache or www-data:www-data. It would 
   be best to configure php-fpm to use a separate pool for each website you host
   and assign a different system user to each.
 *  Thread Starter [eddyferns](https://wordpress.org/support/users/eddyferns/)
 * (@eddyferns)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/installing-wordpress-on-lamp-stack/#post-13136925)
 * If to use php-fpm will it have any issue with the .htaccess file or special configuration
   that needs to be done?
 * And, when creating a separate pool for php-fpm, should the data group ‘www-data’
   remain the same?
 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [5 years, 10 months ago](https://wordpress.org/support/topic/installing-wordpress-on-lamp-stack/#post-13137034)
 * Apache reads .htacess, so php-fpm is not an issue there. I use abc:abc for my
   sites, allowing no access to the default wwww user.
 *  Thread Starter [eddyferns](https://wordpress.org/support/users/eddyferns/)
 * (@eddyferns)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/installing-wordpress-on-lamp-stack/#post-13138914)
 * Should abc:abc be sudo user and group with root privileges?
 * Have found an interesting articles from the same source about php-fpm. Please
   confirm if possible whether the tutorials is reliable for implementing separate
   php-fpm pools on the same server?
 * [https://www.cloudbooklet.com/how-to-install-php-fpm-with-apache-on-ubuntu-18-04-google-cloud](https://www.cloudbooklet.com/how-to-install-php-fpm-with-apache-on-ubuntu-18-04-google-cloud)
 * [https://www.cloudbooklet.com/how-to-setup-sftp-chroot-jail-on-linux-google-cloud](https://www.cloudbooklet.com/how-to-setup-sftp-chroot-jail-on-linux-google-cloud)
 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [5 years, 10 months ago](https://wordpress.org/support/topic/installing-wordpress-on-lamp-stack/#post-13139432)
 * This is not really a WordPress question. I suggest you take it to an Ubuntu support
   forum or mailing list.
 *  [Dion](https://wordpress.org/support/users/diondesigns/)
 * (@diondesigns)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/installing-wordpress-on-lamp-stack/#post-13139446)
 * This isn’t the appropriate place to discuss the setup of FPM pools, but your 
   other question is important.
 * You should **_NEVER_** allow PHP or Apache to run as a user with sudo/root access!
   That opens the door to an attacker being able to take over your entire server.
   They should run as a non-privileged user, and preferably as different users. 
   PHP-FPM (or any other FastCGI solution) allows Apache and PHP to run as different
   users.
 * You didn’t ask, but the filesystem should be owned by the user that runs PHP.
   Apache should never be given write access to the filesystem unless special precautions
   are taken.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Installing WordPress on LAMP stack’ is closed to new replies.

## Tags

 * [Installing wordpress](https://wordpress.org/support/topic-tag/installing-wordpress/)

 * In: [Installing WordPress](https://wordpress.org/support/forum/installation/)
 * 6 replies
 * 3 participants
 * Last reply from: [Dion](https://wordpress.org/support/users/diondesigns/)
 * Last activity: [5 years, 10 months ago](https://wordpress.org/support/topic/installing-wordpress-on-lamp-stack/#post-13139446)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
