wordpress multisite set up on localhost, redirects to live site

When moving a WordPress Multisite install to a different domain (such as from a live site to localhost), there are a few steps you need to follow to ensure that the site works correctly. These include updating the database and adjusting the wp-config.php file. Firstly, the DOMAIN_CURRENT_SITE in your wp-config.php file should not include ‘http://‘. … Read more

Multisite Network Admin

I’m guessing you have an extra https// in your site configuration somewhere. If you look in wp-config.php you should have define( ‘MULTISITE’, true ); define( ‘DOMAIN_CURRENT_SITE’, ‘www.maxray.com.tr’ ); define( ‘PATH_CURRENT_SITE’, “https://wordpress.stackexchange.com/” ); and in the database table wp_site you should have id domain path 1 www.maxray.com.tr / In particular neither copy of your domain here … Read more

Non-super-admin users cannot access CPT even though I have explicitly added the capabilities to the user role

Here’s how I’d handle it (mostly you’re right, and the tweak in your answer to use init gets you closer, but — as you’ve discovered — doing a bunch of switch_to_blog() / restore_current_blog() calls on every single page load is costly). function add_opportunities_capability_to_admins() { // Set up the needed capabilities. $capabilities = array( ‘edit_opportunity’, ‘read_opportunity’, … Read more

How do I test my WordPress subdomains on AWS during migration?

As mentioned by Pat in the comments, my home and siteurl config values were set to https://www.mysite.com and https://app.mysite.com respectively. These values are held inside your site’s database. I think you can change them through the WordPress admin page, or you can enter your database directly and find them with the following command: SELECT * … Read more

Wp-admin wrongly redirecting on multisite

Solved it adding an annotation to the ingress: nginx.ingress.kubernetes.io/rewrite-target: / nginx.ingress.kubernetes.io/use-regex: “true” nginx.ingress.kubernetes.io/configuration-snippet: | rewrite ^(/[^/]+)?(/wp-admin)$ $1$2/ break; rewrite ^(/[^/]+)?(/wp-admin/.*)$ $1$2 break; And changing the pathtype to ImplementationSpecific