• Skip to primary navigation
  • Skip to main content
Sal Ferrarello
  • About Sal Ferrarello
  • Speaking
  • Connect
    Mastodon GitHub Twitter (inactive)
You are here: Home / Solution / Local by Flywheel from Sub-Directory

Local by Flywheel from Sub-Directory

Last updated on February 27, 2022 by Sal Ferrarello

I was recently working on a project that loaded WordPress from a sub-directory. The result of which is if I cloned the project into the public directory, the WordPress files and directories (e.g. index.php, wp-login.php, wp-admin/) were one level deeper (in public/wordpress).

To run the site from this alternate location, I modified the mysite/conf/nginx/site.conf.hbs file.

Changing

root   "{{root}}";

to

root   "{{root}}/wordpress";

After making this change I stopped and re-started the site in Local and it loaded from the new location.

Sal Ferrarello
Sal Ferrarello (@salcode)
Sal is a PHP developer with a focus on the WordPress platform. He is a conference speaker with a background including Piano Player, Radio DJ, Magician/Juggler, Beach Photographer, and High School Math Teacher. Sal can be found professionally at WebDevStudios, where he works as a senior backend engineer.

Share this post:

Share on TwitterShare on FacebookShare on LinkedInShare on EmailShare on Reddit

Filed Under: Dev Tips, Solution, Uncategorized Tagged With: Local by Flywheel, nginx

Reader Interactions

Comments

  1. Ugene Gurung says

    March 8, 2023 at 12:00 pm

    Thank you @salcode,
    I found this answer very helpful. It almost work but I had to put “{{root}}/myfolder” in 2 places down. But definitely, you realized me the simplest way it worked for me.

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Copyright © 2023 · Bootstrap4 Genesis on Genesis Framework · WordPress · Log in