How about a "Use for Core Development" UI?

Hey everyone,

A few WordPress Core committers are trying out Flywheel for developing WordPress, BuddyPress, bbPress, and so on. I, for one, really like the direction y’all are taking it, so I’m planning on trying to replace VVV with it full-time.

When setting up a new site, we are presented with 2 options: “Preferred” and “Custom”

I think this makes total sense, and would be hard to improve, but one thing that isn’t obvious is it is also the gateway to whether or not /app/conf/ is created. If you pick “Preferred” you aren’t able to tweak the configuration to later use that site for development. (I understand why this is, and don’t recommend changing it.)

I think it’d be neat to see a third major option here: “Core Contribution” or the like.

This option could do the following 2 things:

  • git clone git://develop.git.wordpress.org/ . into /app/public/
  • Update root in /conf/nginx/site.conf to be /app/public/src instead of /app/public

This would essentially create a basic, turn-key, WordPress Core Contributor environment. There are certainly other tweaks that could happen, and it could be implemented in several other ways, but the common hang-up so far has been that the “Preferred” option doesn’t create a /conf/ directory, and since it’s the default option and we are learning how Local works, it’s the first mistake I made (and watched someone else make, too) without an obvious path to get WordPress cloned and Nginx looking at /src/.

(We had to delete the site, recreate it using the “Custom” option, stop the server, edit site.conf, start the server, and then everything was good to go. Not a ton of hard work, but tedious to do for every local site.)

Keep up the great work. Thanks for everything!

I’ve just been using Custom and the WordPress Beta Tester plugin. What you really need to remember is to modify your patch to add the src/ to the path. I got bitten by that.

But yes to this.

1 Like

I found this, which helps get PHPUnit and friends installed also:

Just documenting the reference here, Running PHPUnit in PhpStorm with Local

1 Like

I still haven’t been able to get the connection with PhpStorm + Local working, but at least you can run it from the command line!

Hey @JJJ,

Thanks for the feedback! Glad to hear you guys are trying out Local! :smiley:

Do you think it’s worth having the option to choose between svn and git when checking out WP?

I looked into this some more recently. I didn’t find an elegant way to have PhpStorm use existing containers.

The best solution I can think of for this is to release an add-on to remap ports for the Docker containers. Then, you can install your SSH server of choice and use the Remote SSH option in PhpStorm to interface with PHP in the container.

Thanks again for looking into it! An add-on to remap the ports would be perfect. Happy to do a how-to video on this once I can get it working, and easy core contribution WP setup would make it even more ideal.

While I used VVV for a while, local has been a lot faster to spin up new boxes with a lot less resource overhead.

1 Like

@clay

See also this discussion debating Git vs SVN in VVV: Move to Git? · Issue #482 · Varying-Vagrant-Vagrants/VVV · GitHub

1 Like

Has this happened? I use PhpStorm too and would like to be able to do this.

An add-on for mapping ports hasn’t been released yet.

With that said, we’re planning on adding an SSH server to the site containers in an upcoming update.

I’d love to see an easier way to get set up with core development with Local too. I have followed the steps outlined by @JJJ but hitting a brick wall. Site front-end loads, including posts/pages, but wp-admin is stuck in an infinite redirect loop.

Here’s what I did.

  1. Modified site.conf to:
server {
    server_name  _;
    return 302 $scheme://wp-core.local$request_uri;
}

server {
    server_name ~^(.*)\.wp-core\.local$ wp-core.local;
    root /app/public/src;

    index index.php index.html index.htm;

    include do-not-modify/*.conf;
}
  1. In app/public/wp-config.php, added /src/ to ABSPATH.
if ( ! defined( 'ABSPATH' ) )
	define( 'ABSPATH', dirname( __FILE__ ) . '/src' );
  1. Run wp search-replace http://wp-core.local http://wp-core.local/src to update database.

Anyone see anything obviously wrong with what I’m doing?

1 Like

@ericnicolaas,

That looks good to me at first glance!

Are you using FORCE_SSL_ADMIN in wp-config.php?

Thanks @clay. I ended up giving up on this approach but gave it another try today, with FORCE_SSL_ADMIN set to true; it works now, so that may have been what I was missing.

1 Like

I realize this is an older post but I have a working solution for the Local beta.

Everything is documented in WP Core Development with Local Lightning

1 Like