Title: WordPress localhost &amp; localhost/~user_name
Last modified: November 22, 2017

---

# WordPress localhost & localhost/~user_name

 *  [marek_step](https://wordpress.org/support/users/marek_step/)
 * (@marek_step)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/wordpress-localhost-localhost-user_name/)
 * Hello all!
 * MacOS Sierra 10.12.6, Server version: Apache/2.4.27 (Unix), mysql-5.7.16-osx10.11-
   x86_64
 * I tried to install WordPress under 1. /Library/WebServer/Documents/name_of_new_site/
   and 2. ~/Sites/name_of_new_site/
 * Ad 1.
    Everything works fine, except issues with permissions, when I add pictures.
   The permissions are: /Library root wheel /Library/WebServer root wheel /Library/
   WebServer/Documents root wheel /Library/WebServer/Documents/name_of_new_site 
   my_user_name staff
 * Ad 2.
    Nothing works! WordPress changes the localhost/~my_user_name/ to localhost/
 * Any help?
 * Best greetings
    marek

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

 *  [David Sword](https://wordpress.org/support/users/davidsword/)
 * (@davidsword)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/wordpress-localhost-localhost-user_name/#post-9716755)
 * coolestguidesontheplanet.com is great resource for localhost troubleshooting 
   on macOS:
    - [https://coolestguidesontheplanet.com/forbidden-403-you-dont-have-permission-to-access-username-on-this-server/](https://coolestguidesontheplanet.com/forbidden-403-you-dont-have-permission-to-access-username-on-this-server/)
    - [https://coolestguidesontheplanet.com/install-apache-mysql-php-and-phpmyadmin-on-macos-high-sierra-10-13/](https://coolestguidesontheplanet.com/install-apache-mysql-php-and-phpmyadmin-on-macos-high-sierra-10-13/)
 * highly recommend reviewing the tutorials (and some others on there) for pointers
   on getting `/~username/` to work.
 * note: When I upgraded to High Sierra, my apache configs reset and got weird, 
   so if you were planning on upgrading to 10.13 its better to do that first, imho.
    -  This reply was modified 8 years, 6 months ago by [David Sword](https://wordpress.org/support/users/davidsword/).
      Reason: cleaned
 *  Thread Starter [marek_step](https://wordpress.org/support/users/marek_step/)
 * (@marek_step)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/wordpress-localhost-localhost-user_name/#post-9725462)
 * Hello David!
 * Thank for your answer. I found the culprit. Pretty easy if you know!
 * Open your Terminal and change the owner of your your folder /wp-content/uploads/
   like follows:
 * > sudo chown -R _www /Library/WebServer/Documents/your_new_wordpress_site/wp-
   > content/uploads
 * or in your ~/Sites it would be:
 * >  sudo chown -R _www /Users/your_user_name/Sites/your_new_wordpress_site/wp-
   > content/uploads
 * For Unix it would be an other owner: www-data
 * Hope this helps some others. Needed two hours to find it (blushing!)
 * marek
 *  [Dion](https://wordpress.org/support/users/diondesigns/)
 * (@diondesigns)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/wordpress-localhost-localhost-user_name/#post-9726978)
 * While that will work temporarily, it’s not a good solution since more files will
   be added in the future.
 * If file ownership is the problem, and Apache was installed with mpm_prefork and
   mod_php, then the best solution is to change the Apache confiuration to run as
   the localhost user and not as “www-data” or “nobody” user.
 * In your case, you would need to revert the file owndership to its original state
   before making this change.
 *  [HudsonValleyWebDesign](https://wordpress.org/support/users/jaycbrf/)
 * (@jaycbrf)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/wordpress-localhost-localhost-user_name/#post-9733877)
 * Apache should run as www
 *  [Dion](https://wordpress.org/support/users/diondesigns/)
 * (@diondesigns)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/wordpress-localhost-localhost-user_name/#post-9734366)
 * Theoretically that’s true, but:
    - We’re talking about a *nix-based localhost install
    - We must deal with obsolete garbage (mpm_prefork and mod_php)
 * The best *nix-based Apache/PHP production setup would be PHP-FPM, and Apache 
   configured with mpm_event. That would allow Apache to run as “nobody” and PHP
   to run as the user that owns the web-facing files. But on localhost installs,
   as long as Apache is configured to only listen to 127.0.0.1, whatever gets the
   job done is best. 😉
 *  [HudsonValleyWebDesign](https://wordpress.org/support/users/jaycbrf/)
 * (@jaycbrf)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/wordpress-localhost-localhost-user_name/#post-9734839)
 * I follow this tut on ALL my Macs and have them all set up to run WP in a root
   level WWW folder and each WP install is reached @ [http://folderName.dev](http://folderName.dev)
 * [https://mallinson.ca/osx-web-development/](https://mallinson.ca/osx-web-development/)

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

The topic ‘WordPress localhost & localhost/~user_name’ is closed to new replies.

 * In: [Localhost Installs](https://wordpress.org/support/forum/localhost-installs/)
 * 6 replies
 * 4 participants
 * Last reply from: [HudsonValleyWebDesign](https://wordpress.org/support/users/jaycbrf/)
 * Last activity: [8 years, 6 months ago](https://wordpress.org/support/topic/wordpress-localhost-localhost-user_name/#post-9734839)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
