sunrise.php on VIP Go

VIP Go platform specific

This document is for sites running on VIP Go.

Learn more

When developing for a WordPress multisite, it is often necessary to load some custom code very early in the WordPress application’s loading sequence, e.g. to implement some custom domain mapping functionality. For multisite instances on VIP Go, we make it easy to load custom code as part of WordPress Core’s sunrise.php.

Before discussing how, it’s important to note that sunrise.php loads very early in WordPress, and most of its functions won’t be available. Further, sunrise.php loads before mu-plugins, any active plugins, and the active theme. As such, what can be done in sunrise.php is limited, and largely confined to using pure PHP to set constants that override WordPress Core behaviour.

That said, to load additional code in sunrise.php, create a vip-config/client-sunrise.php file in your site’s repository. When present, the file is loaded automatically (ref).

If you have any questions about using sunrise.php in your VIP Go multisite, please feel free to get in touch and we’ll be happy to help.

Ready to get started?

Drop us a note.

No matter where you are in the planning process, we’re happy to help, and we’re actual humans here on the other side of the form. 👋 We’re here to discuss your challenges and plans, evaluate your existing resources or a potential partner, or even make some initial recommendations. And, of course, we’re here to help any time you’re in the market for some robust WordPress awesomeness.