Get current user outside of WordPress Multisite
Have you tried including the wp-load.php file in your external script ? require_once(“/path/to/wordpress/wp-load.php”);
Have you tried including the wp-load.php file in your external script ? require_once(“/path/to/wordpress/wp-load.php”);
Export to WXR for pages containing script and iframe tags
Open up your wp-config.php file. Turn off script concatenating by adding this line: define(‘CONCATENATE_SCRIPTS’, false); Make sure you add this before: /** Absolute path to the WordPress directory. */ if ( !defined(‘ABSPATH’) ) define(‘ABSPATH’, dirname(__FILE__) . “https://wordpress.stackexchange.com/”); Hopefully this helps you save the day for your WordPress installs! But not sure the admin pages. It … Read more
Simple, you don’t separate anything because that is going to be terribly complicated. It is advisable to use the standard WordPress import export. See this tutorial: http://www.wpbeginner.com/wp-tutorials/how-to-move-a-site-from-wordpress-multisite-to-single-install/ However, your plugin and theme options will have to be re-set manually after the transfer. If any of those plugins use custom tables, you’d have to figure how … Read more
This is how it worked for me: – uploaded the file into site root – ran it from the subsite, like this: http://subsite.mainsite.com/my-script.php It ended up inserting the new post into the subsite.
How know the “admin” blog from wordpress multisite?
Update: I’ve got it working now! It still shows a text box that says the User email must be confirmed, but it DOES create the user regardless of that information. Here is the code I have used: function your_disable_activation( $user, $user_email, $key, $meta=”” ) { // Activate the user $user_id = wpmu_activate_signup( $key ); wp_redirect( … Read more
Found a solution for anyone who may stumble upon this. Basically, each part of a standard WordPress htaccess now has two RewriteConds: one for when it is in a subfolder, and another for when its not. Depending on that evaluation, the appropriate RewriteRule is applied. # BEGIN WordPress RewriteEngine On RewriteBase / RewriteRule ^index\.php$ – … Read more
Your nginx configuration is fine, you just need to edit the site name in your Multisite settings in the Sites section, and perhaps run a search-replace across the entire database to replace non-www with www links. I’m not sure, but you might additionally need to create a redirect for your non-www domain, although last time … Read more
User registration problem on multisites web