Multisite Subdomain Dashboard & frontend CSS NOT WORKING after server transfer, Images not loadi

I have transferred my wordpress files to new hosting account and noticed that main Multisite dashboard is working perfect but when it comes to subdomain sites CSS not working, not able to add new post, media is showing nothing.

Checked lots of sites to resolve the issue but i m not able to do so.

Thanks in Advance!

  • Predrag Dubajic

    Hey Veeranki,

    Hope you're doing well today :slight_smile:

    Would you mind allowing support access to site in question so we can have a closer look at this?
    To enable support access you can follow this guide here:
    https://premium.wpmudev.org/docs/getting-started/getting-support/#chapter-5

    If you have not installed WPMU DEV Dashboard plugin yet, kindly do that here: http://premium.wpmudev.org/project/wpmu-dev-dashboard/ and then allow access as per the above process.

    Please respond in this thread once access is granted.

    Best regards,
    Predrag

  • Predrag Dubajic

    Hi Veeranki,

    Since you're on a trial account you can't register site that's already used with another account, you will need to release it from that account and pay full membership in order to register this site with your new account, this is part of our security measures to prevent misuse of our free trial.
    If you have any additional questions about your account please use our contact form: https://premium.wpmudev.org/contact/#i-have-a-billing-question to contact our account department with your question and they will help you there.

    As for the issue in question, I've found your other account and checked the site in question and all the CSS files on subsites are returning 404 errors and that's why you're not seeing any styling, there are not styling files being loaded.

    This is usually issue with misconfigured wp-config.php or .htaccess rules.
    Can you check that DOMAIN_CURRENT_SITE and PATH_CURRENT_SITE values are properly set in wp-config.php file?

    Also, check your .htaccess rules and try setting the default rules for your type of installation, for subfolder multisite that would be this:

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]

    Make sure to have backup of your files before making any changes.

    Let us know how it goes.

    Best regards,
    Predrag

  • Veeranki

    This is my .htaccess file

    # Redirection code starts
    RewriteEngine On
    RewriteCond %{HTTPS} off
    RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
    # Redirection code Ends

    # multi-code starts
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]

    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]
    # multi-code ends

    --------------------
    This is my wp-config.php

    <?php

    /**
    * The base configurations of the WordPress.
    *
    * This file has the following configurations: MySQL settings, Table Prefix,
    * Secret Keys, and ABSPATH. You can find more information by visiting
    * {obito http://codex.wordpress.org/Editing_wp-config.php Editing wp-config.php}
    * Codex page. You can get the MySQL settings from your web host.
    *
    * This file is used by the wp-config.php creation script during the
    * installation. You don't have to use the web site, you can just copy this file
    * to "wp-config.php" and fill in the values.
    *
    * @package WordPress
    */

    // ** MySQL settings - You can get this info from your web host ** //
    /** The name of the database for WordPress */
    define('DB_NAME', '***');

    /** MySQL database username */
    define('DB_USER', '***');

    /** MySQL database password */
    define('DB_PASSWORD', '***');

    /** MySQL hostname */
    define('DB_HOST', '***');

    /** Database Charset to use in creating database tables. */
    define('DB_CHARSET', 'utf8');

    /** The Database Collate type. Don't change this if in doubt. */
    define('DB_COLLATE', '');

    /**#@+
    * Authentication Unique Keys and Salts.
    *
    * Change these to different unique phrases!
    * You can generate these using the {obito https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service}
    * You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.
    *
    * @since 2.6.0
    */
    define( 'AUTH_KEY', '***' );
    define( 'SECURE_AUTH_KEY', '***' );
    define( 'LOGGED_IN_KEY', '***' );
    define( 'NONCE_KEY', '***' );
    define( 'AUTH_SALT', '***' );
    define( 'SECURE_AUTH_SALT', '***' );
    define( 'LOGGED_IN_SALT', '***' );
    define( 'NONCE_SALT', '***' );

    /**
    * Other customizations.
    */
    define('FS_METHOD','direct');define('FS_CHMOD_DIR',0755);define('FS_CHMOD_FILE',0644);
    define('WP_TEMP_DIR',dirname(__FILE__).'/wp-content/uploads');

    /**
    * Turn off automatic updates since these are managed upstream.
    */
    define('AUTOMATIC_UPDATER_DISABLED', true);

    /**#@-*/

    /**
    * WordPress Database Table prefix.
    *
    * You can have multiple installations in one database if you give each a unique
    * prefix. Only numbers, letters, and underscores please!
    */
    $table_prefix = '***';

    /**
    * For developers: WordPress debugging mode.
    *
    * Change this to true to enable the display of notices during development.
    * It is strongly recommended that plugin and theme developers use WP_DEBUG
    * in their development environments.
    */
    define('WP_DEBUG', false);
    define('WP_MEMORY_LIMIT', '64M');
    define( ‘CONCATENATE_SCRIPTS’, false );
    define( ‘SCRIPT_DEBUG’, true );
    /* Multisite */
    define('WP_ALLOW_MULTISITE', true);
    define('MULTISITE', true);
    define('SUBDOMAIN_INSTALL', false);
    define('DOMAIN_CURRENT_SITE', 'www.smartzworld.com');
    define('PATH_CURRENT_SITE', '/');
    define('SITE_ID_CURRENT_SITE', 1);
    define('BLOG_ID_CURRENT_SITE', 1);

    /* That's all, stop editing! Happy blogging. */

    /** Absolute path to the WordPress directory. */
    if ( !defined('ABSPATH') )
    define('ABSPATH', dirname(__FILE__) . '/');

    /** Sets up WordPress vars and included files. */
    require_once(ABSPATH . 'wp-settings.php');

    Account upgraded... and Is there is anything wrng with wp-config or .htaccess file i have mentioned the code above. Even I have tried wid

  • Predrag Dubajic

    Hi Veeranki,

    Huh, the code looks good actually, I don't see anything wrong there...

    Could you send us your FTP or cPanel login details using our contact form https://premium.wpmudev.org/contact/#i-have-a-different-question and the template below so we can investigate this further:

    Subject: "Attn: Predrag Dubajic"
    - Site login url
    - WordPress admin username
    - WordPress admin password
    - FTP credentials (host/username/password)
    - cPanel credentials (host/username/password)
    - Link back to this thread for reference
    - Any other relevant urls/info

    Best regards,
    Predrag

  • Predrag Dubajic

    Hi Veeranki,

    Thanks for sending those in, I checked your files and everything seems in order, there was a typo in this part in wp-config.php:

    define( ‘CONCATENATE_SCRIPTS’, false );
    define( ‘SCRIPT_DEBUG’, true );

    The quotation marks are incorrect so I changed those, however that broke subsite admin section so I commented out those two lines.

    However this didn't help with the frontend CSS I'm afraid :slight_frown:
    It looks like there's something specific to your server that's blocking these files because as far as the WordPress part is concerned everything seems to be in place.

    Please check this with your hosting provider as they should be check further server setup and logs to see what's going on.

    Let us know what information you managed to get from them.

    Best regards,
    Predrag

  • Veeranki

    Hi Predrag.

    Already I have contacted the hosting team they have given me the below reply with reference links -
    Me: For Smartzworld.com, Subdomains are not loading properly. Smartzworld.com main site is loading perfectly but when i m checking the subdomains like smartzworld.com/notes and smartzworld.com/downloads they are not loading properly. and its a wordpress multisite.

    After login into wordpress multisite(smartzworld.com) in subdomain when i click on media no media file is showing up.
    -----------------------------------------------------
    ----------------------------------------------------

    Hosting Team - I understand that you are having a issue with your Multisite WordPress on smartzworld.com and its subsites such as Downloads & Notes as well as not being able to see your media libraries for these. I'm sorry to hear this, Unfortunately due to the complexity of WordPress Multisite we are not able to support this. I can suggest to look for any plugin conflicts by disabling them one at a time then check back with the media library or perhaps to switch the theme that you are using to see if that might correct the issue. I was able to locate some external articles that relate to the missing media library thumbnails which might be of assistance.

    https://forum.ait-pro.com/forums/topic/missing-images-after-bps-pro-installed/
    https://wordpress.stackexchange.com/questions/73783/broken-image-multisite
    ----------------------------------
    Additionally, If I change the Domain pointing IP to old hosting account everything is fine. I'm not able to understand where it has gone wrong while transferring the files. But by comparing the file size, I hope database and files are imported perfectly. New hosting is Nginx Server and Old one is Apache.

    What Should I have to do to resolve this issue now?

    By connecting my domain back to old hosting account, Can I Backup my site in WPMU Dev, then I can transfer it back again? But I don't know how to take the backup and connect it back with the hosting through WPMU Dev and Will it works?

  • Veeranki

    Hi ,

    I got the reply form the hosting team, they said that:

    ME: I have contacted the wordpress developers and they have informed me that something is blocking from the server end. Here is the link - https://premium.wpmudev.org/forums/topic/multisite-subdomain-dashboard-frontend-css-not-working-after-server-transfer-images-not-loading

    Could you please confirm that everything is perfect from that server end?
    ---------------------------------------------------------------------------------------------------------
    Hosting Team: We discovered that there is an issue with the default config on NginX because Multisites uses rewrites for the static content, too.

    In order to work around this, or for any sites which use static content through rewrite rules, you'll need to disable Cache Manager -> Advanced Options -> Accelerate static content for it to work.

    Adding force_passthru paths, too, can help ensure that Apache will serve the requests instead of nginx.
    ------------------------------------------------------------------------------------------------------------------
    ------------------------------------------------------------------------------------------------------------------
    I get understand this work around. Do you understand this work around? Will this helps to resolve the issue?

  • Predrag Dubajic

    Hi Veeranki,

    Oh wow, didn't expect such response from your host, multisite is a bit more complex than the default WP installation but to completely ditch the support for it is really surprising.
    Having your multisite on this host might not be a good thing in the long run because they can avoid providing you help if you run into any other issues with your site.

    Good news is that this actually helps:

    In order to work around this, or for any sites which use static content through rewrite rules, you'll need to disable Cache Manager -> Advanced Options -> Accelerate static content for it to work.
    Adding force_passthru paths, too, can help ensure that Apache will serve the requests instead of nginx.

    I went to Cache Manager -> Advanced Options in your cPanel, switched to site in question, set Accelerate static content to disabled and removed uploads folder from Static Content Path option.
    After saving these new settings your subsites are loading properly now, I also tested creating new post which worked as well so you should be good to go now :slight_smile:

    Best regards,
    Predrag

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.