Multsite redirecting to the main site

Make sure you’ve set up your rewrite rules in your .htaccess file. The Multisite rules are different from the default WordPress rules. If this is an up-to-date version of WordPress, your .htaccess rewrite rules should look like this: Subdirectory RewriteEngine On RewriteBase / RewriteRule ^index\.php$ – [L] # add a trailing slash to /wp-admin RewriteRule … Read more

How to detect the context of homepage for a wordpress mu sub-blog

You could test using the following conditionals //if you aren’t on the main site, and aren’t on the homepage if (!is_main_site() && (!is_front_page() && !is_home())) { print “<a href=”https://wordpress.stackexchange.com/questions/238529/sub-blog-homepage”>home</a>”; } //if you aren’t on the main site, and aren on the homepage if (!is_main_site() && (is_front_page() && is_home())) { print “<a href=”main-site-homepage”>home</a>”; } Also depending … Read more

Database Tables Lost Indexes? How to Recover?

In general, you can fix the databases with some work in myPHPAdmin. See this article (among others found via the googles) https://www.a2hosting.com/kb/cpanel/cpanel-database-features/optimizing-and-repairing-mysql-databases-with-phpmyadmin There is also this post https://www.maketecheasier.com/fix-corrupted-wordpress-database-2/ that says you can let WP repair the databases by addjine one line in your wp-config.php file: define (WP_ALLOW_REPAIR, “true”); …placing it at the location as specified … Read more

error code: 521