Set this to /app/public/wp-content/themes/theme-name. This is where we tell Local where the theme files should be mapped to. The next field you’ll need to set is Add Container Destination. Just click Browse and select your theme directory. This is going to be the path to your theme files on your system. You’ll see two fields that need to be set. Once you’ve added and restarted Local you’ll have a Volumes option under your More tab. Check the checkbox by the Volumes addon to enable it Go to Settings » Add-ons inside Local (1.1.0 or newer) and click on Install Add-onĤ. The solution is a useful little add-on Flywheel has built that allows mounting of additional directories into your sites. The problem we run into is that Local uses Virtualbox which doesn’t support symlinking outside of the shared Virtualbox folder. Helps me keep things up to date as I test different setups. So I can do this to have multiple WordPress sites use the same theme files. This lets me reference the theme files from my main Themes directory in the wp-content/themes directory. In the case of themes I store the git repo of the theme files in my Themes directory and symlink it to my Sites/site/app/public/wp-content/themes directory of the current site I’m working on locally. And it’ll show in your file system, but WordPress won’t recognize the theme or plugin. One issue I ran into is that a traditional symlink won’t work with the container based setup Local uses. It’s got some really nice features and has a nicer GUI than Vagrant and it’s free-er than MAMP. I’ve been testing out Local by Flywheel for local development recently. In my theme or plugin development workflow I like to keep the git repository separate from my local WordPress install. I’ve written on a development workflow with symlinks before and Kinsta has a great article on symlinks. As of the release of Local Lightning (5.0+) the Volumes addon used in this article is no longer in use.
0 Comments
Leave a Reply. |