Comments (8)
@ZubaeyrMSFT - seems to be some URL redirection configuration setup, look into this issue on priority.
from wordpress-linux-appservice.
Please note that a Multisite WordPress can be associated and accessed with only one domain. You have used an AFD endpoint for installing the multisite (wordpressp-xxx.azurefd.net). And therefore, the WP is configured with it, and all the embedded links would point to it.
Few questions I wanted to understand. Are you looking for a subdomain-based multisite or subdirectory-based multisite? I see that you have installed subdirectory multisite and trying to access it like a subdomain one?
Please follow the instructions here: How to enable multisite WordPress on App Service and also refer to the Important Notes section in there.
These are the steps for converting a new single site to multisite (assuming AFD is already integrated with App Service and necessary app settings are added as mentioned here)
-
Map all the required custom domains to the AFD endpoint.
customdomain.org, site1.customdomain.org, site2.customdomain.org etc., -
Add the following App Settings to install subdomain based multisite. This will only work if multisite isn't installed already.
CUSTOM_DOMAIN - customdomain.org
WORDPRESS_MULTISITE_TYPE - subdomain
WORDPRESS_MULTISITE_CONVERT - true -
Add the following App Setting to install subdirectory based multisite. This will only work if multisite isn't installed already.
CUSTOM_DOMAIN - customdomain.org
WORDPRESS_MULTISITE_TYPE - subdirectory
WORDPRESS_MULTISITE_CONVERT - true
from wordpress-linux-appservice.
If you want to update your current multisite to point to custom domain. You can try manual steps mentioned below.
- Map all the required custom domains to the AFD endpoint.
- Add CUSTOM_DOMAIN app setting to your App Service. (ex: customdomain.org)
- In order to change the domain associated with the multi-site post installation, you might have to manually update the occurrence of the old domain name in the MySQL database tables (i.e., replace occurrence of AFD endpoint with custom domain). Some common tables to look for are wp_options, wp_site, wp-blog, wp_users, wp_usermeta, wp_sitemeta and so on. Moreover, there can be specific sub-site tables (wp_2_site, wp_2_options etc.,). You can use /phpmyadmin to access your database.
from wordpress-linux-appservice.
I was trying to have a mix of multi-site and multi-domain.
I think that's what author of #84 did. Having wordpress configured with multi-site directory but AFD configured with multiple domains, e.g:
myfirstdomain.com -> wordpressp-xxx.azurefd.net/site1
myseconddomain.com -> wordpressp-xxx.azurefd.net/site2
but from what you're saying that's not possible - one wordpress instance == one domain?
Only sub-domains can be used?
from wordpress-linux-appservice.
Yes, you are right. Multisite supports only one main domain at a time. May I know if there are any reasons for using the mixed approach? And why not just use subdomain based multisite? It's better go with purely subdomain-based multisite in this case.
from wordpress-linux-appservice.
Thanks for all the answers and support!
I was trying to follow this - https://www.wpbeginner.com/wp-tutorials/how-to-create-a-wordpress-multisite-with-different-domains/ where different domains were possible.
I thought with AFD I can hide paths or set headers to make it work...
from wordpress-linux-appservice.
I went with subdomain route.
I verified with /phpmyadmin
that all values are correct.
I checked that FD is setting custom host header on the route -> the subdomain one site3.wp.xxx.org
. It was also added to app service as custom domain.
It doesn't work for me though - I cannot view the site (it shows the main one on wp.xxx.org) and I was getting CORS errors, so I've added subdomains to my App Service settings.
Still getting errors though:
Uncaught DOMException: Failed to execute 'replaceState' on 'History': A history state object with URL 'https://wp.xxx.org/wp-admin/post-new.php' cannot be created in a document with origin 'https://site3.wp.xxx.org' and URL 'https://site3.wp.xxx.org/wp-admin/post-new.php'.
from wordpress-linux-appservice.
the subdomain part worked after adding this to wp-config.php
/** overriding HTTP_HOST header */
if (!empty(getenv('AFD_DOMAIN'))) {
$_SERVER['HTTP_HOST'] = getenv('AFD_DOMAIN');
}
if (array_key_exists('HTTP_X_FORWARDED_HOST', $_SERVER) && !empty($_SERVER['HTTP_X_FORWARDED_HOST'])){
$_SERVER['HTTP_HOST']=$_SERVER['HTTP_X_FORWARDED_HOST'];
}
from wordpress-linux-appservice.
Related Issues (20)
- Errors in Azure Email Logs - emails not getting sent HOT 4
- Terraform: An argument named "docker_image_name" is not expected here. HOT 1
- Startup script lacks permissions to modify nginx config files HOT 3
- [REOPEN] Images not displayed in editor #96 HOT 2
- Image uploads returning the wrong URL HOT 1
- unable to load ldap extension HOT 3
- [email protected] not working HOT 2
- Unable to convert to multisite. HOT 4
- Intl: is not installed, or has been disabled. HOT 4
- Export frozen @ 20% with no error HOT 2
- HSTS Preloading Should Be Opt-In
- Wordpress on Azure appservice email integration plugin missing HOT 8
- Startup Command Field HOT 3
- CUSTOM_DOMAIN not working correctly HOT 7
- Azure Communication Services Sending File Attachments HOT 8
- Downtime for updated images HOT 1
- Outdated PHP
- Enable / Disable phpmyadmin
- Application Insights for WordPress
- Question: Production & Staging Swap
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wordpress-linux-appservice.