New answers tagged

0

This is for future reference: Currently: WordPress 4.5 (Date: 04/28/16 | With the nag message to update to WP 4.5.1) My tweaked version: // -- Originally in the post, not sure if this is necessary // -- remove_filter('wpmu_signup_blog_notification', 'activate_on_blog_signup'); // This function runs after Sign Up Step 2 function activate_user_and_blog( ...


0

I've fixed it with my hosting company. They added the domainnames as a CNAME to the main domain which did the trick.


0

Finally I figured out the cause and solution to my problem above. When I trying to send email in sub domain say http://test1.example.com, without custom From email address in header, the wp_mail() function itself sets the From email as support@test1.example.com which is invalid and hence the email was not sent. So to solve this, myself added a custom From ...


0

There is not a lot of ways to my knowledge to 'convert' the website. The best solution I could suggest is by installing WordPress Multi-site freshly in a somewhere else then pull over the plugin files, theme files and uploads over to the newly installed multi-site. Then use any simple export/import plugins to pull over anything else needed like comments, ...


0

If you have access to the MySQL DB, make sure that wp_blogs.domain is correct, and also wp_blogs.path. Also, run the following to verify the values are correct (assuming WP_OPTIONS is the table holding the options for your main site). SELECT * from wp_options where option_name = 'siteurl' or option_name = 'home';


0

I am sorry to say but both of Mark's comments are correct. questions concerning third party plugins and themes. As these required detailed knowledge of the workings of those plugins and themes, support is difficult and with thousands of plugins and themes available such knowledge is very specialized. Please consult the appropriate support forum ...


0

So I decided to go with "load more" clicking option but the code I"m using doesn't work, click on load more and nothing happends. Index.php: <div id="content"> <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $args = array( 'multisite' => 1, 'sites__not_in' => array(1), 'paged' => $paged,); $loop = new ...


0

Infinite scroll usually requires some kind of Javascript library to load more results via Ajax. The basic idea is this: User arrives at your page, you show, say, 5 posts per page They scroll past a certain offset and you use JavaScript to trigger an Ajax request Your request passes the requested paged, the endpoint receives the request, and returns just ...


2

1) Install & network activate User Role Editor plugin from http://example.com/wp-admin/network/plugins.php 2) Then go to Settings > User Role Editor menu on network and make sure you have the settings as shown in following screenshot. 3) Go to "User Role Editor" settings page on your main site ...


1

There is nothing in the core or in the rest API for this requirement. You can try this plugin, https://github.com/remkade/multisite-json-api Sorry, but I see no other chance and no more to say in this answer.


0

The answers here are overthought and too complex. Why deactivating the plugin instead of preventing activation? Something as simple as calling die('your error message here) upon activation will do the job. function activate($networkwide) { if (is_multisite() && $networkwide) die('This plugin can\'t be activated networkwide'); } ...


0

I think you need Domain Mapping. Domain mapping allows a blog on a multisite install to serve from any domain name. This way a blog does not have to be a subdirectory of the main install, or a subdomain. The WordPress Default supports Domain Mapping without Alias. Add the Domain in the blog-settings to the blog of the Network administration area. Older ...


0

There are two commonly used mapping plugins for WordPress. For the next lines we assume you use the free WordPress MU Domain Mapping plugin from the WordPress plugin Repository. From your post I understand you have correctly mapped your domains (you have a dedicated IP or have already set-up the CNAMEs correctly). You have also correctly mapped your domains ...


0

This is an old question, but I just ran into this same issue and found the problem: the MU Domain Mapping plugin is using a deprecated constant, PLUGINDIR, to remap the plugin directories on the mapped domains. The plugin seems to be very vaguely developed nowadays (and no releases have been out for a year), so I just edited my copy of the plugin directly. ...


1

I was using WordPress Multisite for multiple TLDs. Example: domain.com another-domain.org sample-domain.net The primary site was domain.com which was a valid registered domain name with proper DNS resolution. another-domain.org and sample-domain.net had both expired domain name registrations. A/K/A - The DNS wasn't resolving properly. If you've got ...


-1

I've two domains mysite.com and mysite.it the second domain (mysite.it), redirect to the first (mysite.com). I've configured my network with Sub-directories es: mysite.com/en


1

get_transient / set_transient example: function my_get_user_count() { $usercount = get_transient('usercount'); if (!$usercount) { $usercount = count_users(); set_transient('usercount',$usercount,600); // ten mins } return $usercount; }


0

To be honest even after your Update: How may I fix the fact that the admin area preserves the original url when using the Domain Mapping plugin (the one with the sunrise.php)? I don't quite understand whether you want to "Redirect administration pages to network's original domain" or not. In any case, as per the installation page: "Redirect ...


0

I have tried VA Simple Expires https://wordpress.org/plugins/va-simple-expires/ Works pretty well. Unfortunately Post Expirator plugin did not work for me because posts imported via CSV did not expire. Regarding VA Simple Expires - if you use CSV you should just add couple fields: scadenza-enable=1 scadenza-date=target time (e.g. 2016-04-10 00:42:00)


0

The number of tables is not an issue by itself. Actually separating the tables for each blog make each operation related to a specific blog more performant. Your scaling problem will come more likely from the big monolithic users tables. Scaling issues will come from the amount of requests your DB will have to handle, not the actual organization of the ...


0

This appeared to be a very strange bug coming from either my laptop or my network connection. I ended up turning on my VPN and I was able to access everything normally. Hopefully this helps if anybody else runs into this strange issue.


1

There is no built-in way to do it. The .htaccess is "printed in the screen" of the wp-admin ones you are setting up the multisite (the same for wp-config.php). That info is never write directly in .htaccess file like the single site. The wordpress core code for multisite / htaccess is here: ...


0

I've used a similar approach on many CMS projects throughout the years. It works really well for rapid development, but it does have issues. If you can trust that the web server (apache, nginx) are configured correctly, you could use $_SERVER['SERVER_NAME'] to retrieve the hostname as configured by the webserver. (Reference: ...


0

The obvious problem is that you are trusting user input (http headers) which makes your code suspicious from security POV. Other then that, no real problems with it, but my experience is that such hacks have a tendency to just move whatever problem you are trying to solve this way to another place.


0

As far as i can see (2 years wordpress/woocommerce) i have always used WP_HOME and WP_SITEURL. Makes it very easy to move site from one domain to another, never had any issues with it even when moving ecommerce shops. You might want to go to admin panel and save permalinks there so they would be updated in DB, but usually it is not necessary. NB! It won't ...


1

Obviously there are steps. And you have to choose whether you want to go with subdomain or subfolder (and under certain condition you can overwrite your own choice upon the default). I found a nice step-by-step guide to WordPress Multisite Helpful is: The Complete Guide To Creating A WordPress Multisite Installation by Kevin Muldoon It has a good tail ...


1

You can always read through the documentation that WordPress.org has put together on Creating A Network. The point below was taken from Step 1: "Also deactivate all active plugins. You can reactivate them again after the network is created." After the network is created I recommend activating your Plugins one by one and testing your site each time ...


0

This error means $response isn't returning the array you expect but a wordpress error object. Try if( is_wp_error( $response ) ) { echo $response->get_error_message(); } and see what you get.


0

It's now possible in recent version of Wordpress (since 3.8 ?), with the right "manage_network_users". You can access it with the User Role editor plug-in, for example (in network admin prefs).


0

It's likely because your authentication cookie is set to dev.example.com/site1/ when you login to site1, and naturally the browser won't pass that cookie for site2. What you can try and do is play around with the SITECOOKIEPATH and ADMIN_COOKIE_PATH, which by default are set as follows: SITECOOKIEPATH to get_option('siteurl') ADMIN_COOKIE_PATH as ...



Top 50 recent answers are included