Title: localhost (with symlink) / apache / wp-cli install refers to wrong folder!
Last modified: May 21, 2017

---

# localhost (with symlink) / apache / wp-cli install refers to wrong folder!

 *  Resolved Anonymous User
 * (@anonymized-10133093)
 * [9 years ago](https://wordpress.org/support/topic/localhost-with-symlink-apache-wp-cli-install-refers-to-wrong-folder/)
 * Hi, this problem is killing me!
 * I have setup Fedora 25 and Apache, MariaDB and PHP. It took 3 days, but all the
   settings now seem good.
 * I can use wp-cli to install and configure WP with 0 install errors shown on the
   command line, all databases created, and it all seems good BUT…
 * I have a folder with all my sites in **/home/david/sites** and I have made a 
   simlink to it **sudo ln -s /home/david/sites /var/www/html**. This is where I
   create a directory and install WP with wpcli.
 * I have mod-rewrite setup in the apache preferences AND wp-cli, and here is my
   wp info to confirm:
 * **PHP binary: /usr/bin/php
    PHP version: 7.0.18 php.ini used: /etc/php.ini WP-
   CLI root dir: phar://wp-cli.phar WP-CLI packages dir: WP-CLI global config: /
   home/david/.wp-cli/config.yml WP-CLI project config: WP-CLI version: 1.1.0
 * (I can use the duplicator plugin to clone a previously saved site into a folder
   in my sites directory and it works 100% including the permalinks.)
 * When I create a WP site inside **sites/example** I visit **[http://localhost/sites/example/](http://localhost/sites/example/)**
   and there it is BUT all the references inside the site have a 404 and refer to
   the wrong directory (for example):
 * [http://localhost/example/wp-content/themes/twentyseventeen/style.css?ver=4.7.5](http://localhost/example/wp-content/themes/twentyseventeen/style.css?ver=4.7.5)
 * The part of the directory ‘sites’ has vanished! I just can’t work out what is
   going on, it’s driving me crazy! In case anyone else is having problems to get
   this far, here’s what I needed to do… there was no decent guide anywhere:
 * MANY THANKS TO THE GENIUS TO HELP ME!
 * > install
   >  ——- sudo dnf -y install php php-mysqlnd php-opcache (for drupal) sendmail(
   > for wp-cli) (maybe php-mcrypt) mariadb-server phpmyadmin
   > start the services (lamp-start.sh)
   >  ——————
   > sudo systemctl start httpd.service
   >  sudo systemctl start mariadb.service
   > setup security
   >  ————– sudo mysql_secure_installation
   > change phpmy admin setting to allow logging into (root or whatever) with no
   > password
   >  ———————————————————————————— sudo gedit /etc/phpMyAdmin/config.inc.
   > php
   > $cfg[‘Servers’][$i][‘AllowNoPassword’] = TRUE;
   > change some apache settings
   >  —————————
   > sudo gedit /etc/httpd/conf/httpd.conf
   > 1. change ‘User david’ (from apache)
   > allow mod-write
   >  —————
   > 2. # AllowOverride controls what directives may be placed in .htaccess files.
   > #
   > It can be “All”, “None”, or any combination of the keywords: # Options FileInfo
   > AuthConfig Limit # AllowOverride All
   > Make symbolic link from apache server default directory to your sites directory
   > ——————————————————————————-
   > sudo ln -s /home/david/sites /var/www/html
   > Tell SELinux that these files/directories are allowed to be modified by Apache
   > ——————————————————————————
   > chcon -R unconfined_u:object_r:httpd_sys_rw_content_t:s0 /home/david/sites

Viewing 1 replies (of 1 total)

 *  Thread Starter Anonymous User
 * (@anonymized-10133093)
 * [9 years ago](https://wordpress.org/support/topic/localhost-with-symlink-apache-wp-cli-install-refers-to-wrong-folder/#post-9155502)
 * USER ERROR!! I did not notice the install script used:
 * currentdirectory=${PWD##*/}
 * wp core install –url=”[http://localhost/$currentdirectory&#8221](http://localhost/$currentdirectory&#8221);
 * This was the problem, arrgghh!!

Viewing 1 replies (of 1 total)

The topic ‘localhost (with symlink) / apache / wp-cli install refers to wrong folder!’
is closed to new replies.

## Tags

 * [wp-cli](https://wordpress.org/support/topic-tag/wp-cli/)

 * In: [Localhost Installs](https://wordpress.org/support/forum/localhost-installs/)
 * 1 reply
 * 1 participant
 * Last reply from: Anonymous User
 * Last activity: [9 years ago](https://wordpress.org/support/topic/localhost-with-symlink-apache-wp-cli-install-refers-to-wrong-folder/#post-9155502)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
