Skip to content
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

hey there. getting 404 error with new network #198

Open
djedjehasi opened this issue Jul 10, 2023 · 2 comments
Open

hey there. getting 404 error with new network #198

djedjehasi opened this issue Jul 10, 2023 · 2 comments

Comments

@djedjehasi
Copy link

djedjehasi commented Jul 10, 2023

hello there.
i have empty wordpress project just started. I'm trying to setup this structure:

domain.com > portfolio.domain.com >> portfolio.domain.com/template1

i added new subdomain on Cpanel called portfolio.domain.com, then installed multisite, and multi network on top (including commenting out the DOMAIN_CURRENT_SITE line in my wp-config.php file).
atm i have the main website domain.com and added the new portfolio.domain.com as new network and site. when trying to get into the dashboard or view the of portfolio.domain.com i get the 404 error.

what can i do?

@renatofrota
Copy link

Have you set the document root of portfolio.domain.com to the same path as domain.com website (where Multisite is)?

If your control panel does not allow that, just delete the folder "portfolio" (which is probably the document root) and create a symllink instead (portfolio -> document root of domain.com) or ask your hosting support to create it for you.

e.g.: link -s /home/user/public_html /home/user/public_html/portfolio

@renatofrota
Copy link

renatofrota commented Jul 10, 2023

If you are running cPanel and can't change the document root of portfolio subdomain, considering symlinks may be an issue for those less experienced, it may be easier to add portfolio.domain.com as parked/alias domain of domain.com . This will create a new VHost in Apache with the proper document root. Depending on your hosting provider policies, this is only doable if domain.com is the primary domain of your cPanel account.

You may need to add a DNS record for portofolio in domain.com DNS zone by yourself.

It may be either an A entry:

portfolio IN A <same IP as domain.com>

or a CNAME:

portfolio IN CNAME domain.com.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants