0

I have a WordPress Multisite installation at blog.example.com. I wish to serve it on somedomain.com/blog, I wish to know if this is possible.

I'm aware of mapping blog.example.com to somedomain.com orabc.somedomain.com. I have Caddy server powering the WP multisite.

Let me know how do I go about solving this problem.

1 Answer 1

1

You can set up Caddy to reverse proxy requests to the Multisite installation:

In your Caddyfile, add a reverse_proxy directive for the Multisite:

somedomain.com/blog {
    reverse_proxy blog.example.com
}

This will forward all requests to somedomain.com/blog to the Multisite installation at blog.example.com.

Next, update the WordPress Multisite configuration to use the new domain:

In your WordPress database, go to the wp_blogs table and locate the row for your main site (usually with blog_id of 1).

Change the domain and path values to somedomain.com and /blog, respectively.

Also update the siteurl and home values in the wp_options table to https://somedomain.com/blog.

steps required depending on your specific setup, such as updating permalinks, changing any hard-coded links in your content, and configuring SSL certificates.

1
  • Do I need to setup reverse proxy on the multisite installation OR the target domain?
    – TheBigK
    Commented Feb 24, 2023 at 16:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.