On WP Multi sites how many sites…!

The main problem is that you’re using GoDaddy shared hosting to host 60-site multi-site systems and still expecting it to work. GoDaddy shared hosting is not appropriate for this kind of setup. Once you get past the 5-6 sites range, you need a dedicated server for them. Get a better hosting account. Pay for it.

4 single sites VS multisite wordpress

You can use one installation for four (or more) singular sites without multi-site. Just point all domains to the same directory with your WordPress installation. In your wp-config.php set the necessary variables and constants depending on the currently requested host: switch ( $_SERVER[‘HTTP_HOST’] ) { case ‘example.com’: $table_prefix = ‘ecom_’; $table_name=”ecom”; break; case ‘example.net’: $table_prefix … Read more

How to run Two WordPress blogs with different themes and with single database and same content

I’ll try to explain how it might be done, but not sure it will work: Install 2nd website with single db (2 copies). Create new table in your db. Call it wp_options2 and copy everything from wp_options into the new table in second install in wp-config.php, before if ( !defined(‘ABSPATH’) ) add define( ‘M7_OPTIONS_TABLE’, ‘wp_options2’ … Read more

get_current_blog_id returns 1 in multisite setting

get_current_blog_id() uses the global variable $blog_id as noted at https://codex.wordpress.org/Function_Reference/get_current_blog_id. When I’ve seen this problem before it’s because I’m declaring $blog_id in my PHP code which is overwriting the WordPress global variable that provides the ID of the subsite. Change the variable name of $blog_id and hopefully the function will start returning the correct site … Read more

wp_get_attachment_image_src multisite issue

Some of the more archaic code is still present in WordPress, notably globalising variables inside functions. A good example of thise is get_current_blog_id(), which is present in wp-load.php: /** * Retrieve the current blog ID. * * @since 3.1.0 * * @global int $blog_id * * @return int Blog id */ function get_current_blog_id() { global … Read more

Integrating WordPress to my website, while keeping my own authentication system

WordPress’s authentication system is made up of pluggable functions, which means that you can write a plugin that has a function named, say, wp_authenticate(), and your site will use your wp_authenticate() function instead of the native WordPress one. Your comment about is_user_logged_in() (on your original post) is obviated by the fact that is_user_logged_in() calls the … Read more