New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom directory layout (initial support) #565

Closed
borekb opened this Issue Nov 23, 2015 · 18 comments

Comments

Projects
None yet
7 participants
@borekb
Copy link
Member

borekb commented Nov 23, 2015

For instance, Bedrock (the roots.io project) uses a folder structure like this:

├── composer.json
├── config
│   ├── application.php
│   └── environments
│       ├── development.php
│       ├── staging.php
│       └── production.php
├── vendor
└── web
    ├── app
    │   ├── mu-plugins
    │   ├── plugins
    │   ├── themes
    │   └── uploads
    ├── wp-config.php
    ├── index.php
    └── wp

Note: Bedrock also uses custom configuration system so we cannot support it as a whole yet, however, the structure is something we possibly could.

We've also had similar request from e-labo.biz who use a similar structure but without the Composer files and with index.php and wp-config.php inside the app folder.

  • This issue is blocked by #630

@borekb borekb added this to the 3.0 milestone Nov 23, 2015

@JanVoracek JanVoracek self-assigned this Jan 8, 2016

@borekb borekb added the in progress label Jan 15, 2016

@JanVoracek

This comment has been minimized.

Copy link
Member

JanVoracek commented Jan 19, 2016

We will need #630 for sync workflows with custom structure. For example you can't restore the site without knowledge of its structure.

@pavelevap

This comment has been minimized.

Copy link
Contributor

pavelevap commented Jan 19, 2016

Some other notes:

  • Many security plugins recommend to change name and location of wp-content directory.
  • WordPress can be installed in its own directory (manual).
  • Users can also change their upload_path (and they do it).
  • Users can change their wp-content directory (name or path) in wp-config.php (manual).
  • User can also change URL address in wp-config.php (manual).

I met all these modifications and they are pretty common.

@borekb

This comment has been minimized.

Copy link
Member

borekb commented Jan 19, 2016

A couple of notes from today:

  1. The support will need to be partial - there are just too many use cases to reasonably cover in the 3.0 release timeframe. For example:
  • What to do if the user changes the structure while VersionPress is active and then tries to roll back to the old structure?
  • We could support Bedrock's folder structure but they will not work with VP anyway because of their custom configuration mechanism.
  • What if the user wants to move WordPress files away from the project root folder, i.e., outside of what Git can see?

We will need to define a clear set of scenarios we're going to support in this ticket and stick to it.

  1. We will need to properly document what we support and what should not be done. Ideally, we should detect whether the user isn't doing something that's not supported by us, for example, she changes the folder layout while VersionPress is activated. However, this is also quite a hard thing to do because what should we do if we detect the problematic scenario? Just display a warning? What if it's ignored?
@borekb

This comment has been minimized.

Copy link
Member

borekb commented Jan 19, 2016

We also ran a quick survey, see this tweet and this Google Forms form.

💥 TODO we need to compile the results, group the responses to see what people actually request to support real-world scenarios.

@JanVoracek

This comment has been minimized.

Copy link
Member

JanVoracek commented Feb 16, 2016

Reopen: MediaTest fails

Uploaded file is not committed.

@JanVoracek

This comment has been minimized.

Copy link
Member

JanVoracek commented Feb 26, 2016

WpConfigSplitterTest fails. Reopening.

@borekb

This comment has been minimized.

Copy link
Member

borekb commented Mar 15, 2016

What exactly is supported as part of this issue is described here: #694 (comment)

@LukeAbell

This comment has been minimized.

Copy link

LukeAbell commented Apr 23, 2016

Would love to get bedrock support for versionpress!

@borekb

This comment has been minimized.

Copy link
Member

borekb commented Apr 26, 2016

@LukeAbell Bedrock's structure is supported in v3.0 but their configuration system is yet another challenge and does not work with VP at the moment. With that being said, I am personally a big fan of everything that the Roots.io guys do and it would certainly be nice to make the two projects work well together one day.

@borekb borekb changed the title Custom directory layout Custom directory layout (initial support) Apr 28, 2016

@LukeAbell

This comment has been minimized.

Copy link

LukeAbell commented Dec 9, 2016

Any movement here?

@borekb

This comment has been minimized.

Copy link
Member

borekb commented Dec 9, 2016

@LukeAbell This issues is done at the scope described in #694 (comment). If you have new specific requirements, feel free to open a new issue.

@swalkinshaw

This comment has been minimized.

Copy link

swalkinshaw commented Feb 2, 2017

@borekb can you give any more details on the issues with VP and Bedrock's "configuration system"?

We just load a couple additional files but wp-config.php still exists as needed.

@borekb

This comment has been minimized.

Copy link
Member

borekb commented Feb 2, 2017

I'd need to refresh my memory but I think it was that VersionPress has its own approach to multi-env configuration which is not entirely compatible with Bedrock. For example, VP needs to carefully gitignore what needs to be local (DB connection, for example) vs. what is shared.

@swalkinshaw

This comment has been minimized.

Copy link

swalkinshaw commented Feb 2, 2017

Interesting...

So here's what I can gather:

  • wp-config.php is ignored because it might contain sensitive data
  • VP injects and uses wp-config.common.php to parse out some constants

In Bedrock, wp-config.php just acts as a loader so there's nothing sensitive in it anyway but it is version controlled. I don't know if that's a conflict.

Bedrock requires config/application.php which is basically equivalent to wp-config.common.php and can contain the constants VP needs.

Interestingly, WpConfigSplitter can accept a custom config path. Theoretically it could take config/application.php and everyone can be happy. But there's the issue of the include statement for wp-config.common.php which is hardcoded and would conflict.

Bedrock's is obviously different: https://github.com/roots/bedrock/blob/f7f3655829e7f9339b965585539e2570103223ef/web/wp-config.php#L8

@borekb

This comment has been minimized.

Copy link
Member

borekb commented Feb 2, 2017

Great analysis, I think the two will be made work together at some point, there shouldn't be any major roadblocks.

@acki

This comment has been minimized.

Copy link

acki commented Feb 5, 2017

+1

@juslintek

This comment has been minimized.

Copy link

juslintek commented Apr 6, 2018

Tell me what is stopping from making this work, maybe I can fork or you can make a branch for me. I really need this feature. I'm prepared to work on this.

@borekb

This comment has been minimized.

Copy link
Member

borekb commented Apr 6, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment