1
submitted 11 months ago by theZazern@alien.top to c/main@selfhosted.forum

Hi, all!

I have just finished installing my wordpress setup on my server. The goal is to use it for a subdomain of my website, but I am struggling to make the (DNS?) connection. How do I connect the two? I have created a subdomain at my domain provider, and my wp-config is configured for the subdomain, but I do not understand what I am to do next. I suspect I need to do some kind of DNS connection but I have scoured the internet and can only find cases where people connect to wordpress servers, not my self hosted case.

Help!

you are viewing a single comment's thread
view the rest of the comments
[-] Still-Snow-3743@alien.top 1 points 11 months ago

I've sysadmined wordpress for about 7 years professionally, so this stuff is as easy as making cereal to me. But there is a few steps. On a high level:

- Subdomain must point to your public IP

- Your public IP probably changes sometimes so you should have a way to automate updating the IP for your home server via the DNS provider's API

- Your router must be forwarding port 80 and 443 to your server

- Your server needs a web server software that can take the request and map it to the right virtual host for your site (and you need to make said virtual host)

- The wordpress install needs to have used wp-cli or a wp-config.php hack to change the domain of the site that wordpress thinks it is running as

- You need to secure the domain with letsencrypt, certbot will do this for you

This is the steps for a traditional web server, but since we usually use docker around these parts, instead of the normal web server software (apache or nginx) the way to use in docker is "letsencrypt nginx proxy companion" which will route an incoming connection to the docker container running wordpress and handle letsencrypt for you.

There are also a few other ways one might commonly set this all up, and what steps you are missing depends on the way you are hosting wordpress right now.

If you fill in some of the missing information on what you do or dont have from the steps above, I'll let you know what's next. Or you can send me a PM on reddit and I'll help you out!

this post was submitted on 29 Nov 2023
1 points (100.0% liked)

Self-Hosted Main

504 readers
1 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

For Example

We welcome posts that include suggestions for good self-hosted alternatives to popular online services, how they are better, or how they give back control of your data. Also include hints and tips for less technical readers.

Useful Lists

founded 1 year ago
MODERATORS