How to create sub site in wordpress multisite programmatically?

With wpmu_create_blog() function, we can create subsites easily. Add the following code in your form submit wpmu_create_blog ( ‘your_domain’, ‘/subsite_path’, ‘Title of Subsite’, ‘1’ ); NB: if your site url is https://www.example.com then your_domain is should be example.com Ref: https://www.krishaweb.com/how-to-programmatically-create-new-site-in-wordpress-multisite-within-60-minutes/

All pages have 302 redirect, which I can’t remove

Welcome! Because you are using multisite, there are a few other places your site may have the WWW active. I would look in the following: wp-config.php under “DOMAIN_CURRENT_SITE”. info wp-config.php under “WP_HOME” and/or “WP_SITEURL” info Inside the database under the “{prefix}_site” (wp_site) table info Inside the database under the “{prefix}_blogs” (wp_blogs) table info Failing those … Read more

Buddypress on Multisite – Member List

BP on multisite can be quite complicated. If you network-activated BP, then afaik the users will be available on all ‘blogs’. There are several ways to config a BP > multisite install. There are a couple of plugins that may help, for example: https://buddydev.com/plugins/buddypress-multi-network/ More info from the BP codex: https://codex.buddypress.org/getting-started/installation-in-wordpress-multisite/

NGINX rewrite rules for sub subdomains

No, sorry, that isn’t going to be possible. Assuming the user connects to your server at https://www.sub.domain.com with HTTPS, the sequence of events will be: the user’s client makes a connection and initiates an SSL negotiation; they will send SNI (= server name indication) that they’re connecting to www.sub.domain.com the server can use the SNI … Read more

Issue with htaccess redirection in WP Multisite

Every URL that has example.com/<non-existent-page> redirects to the main page: example.com/es/. This is presumably being done by WordPress itself, as there is nothing in what you’ve posted (in .htaccess) that is doing this. You probably need to add an additional “wildcard” redirect to redirect /<anything> (except for /es and /en) to /es/<anything>. For example: RewriteCond … Read more

error code: 521