Styles missing on a mapped domain

The Domain Mapping doesn’t show theme’s styles. The styles return 404 error.

The wp-content folder is renamed from the wp-config.php file:

define( 'WP_CONTENT_DIR', dirname(__FILE__) . '/blog/wp-content' );
define( 'WP_CONTENT_URL', 'http://example/blog/wp-content' );

And the theme’s styles loading from:

mapped.com/themes/theme-name/style.css

Instead of:

mapped.com/wp-content/themes/theme-name/style.css

  • Vaughan
    • Support/SLS MockingJay

    Hi lance

    You can also use this method without having to edit the plugin code at all.

    Be aware, that using the above method, your image files on your mapped domains will be using your main site domain.

    simply use the following code in your wp-config.php

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

    define('WP_CONTENT_FOLDERNAME', 'multi-content');
    define ('WP_CONTENT_DIR', ABSPATH . WP_CONTENT_FOLDERNAME);
    $host = filter_var($_SERVER['HTTP_HOST'], FILTER_SANITIZE_URL).'/';
    $scheme = filter_var($_SERVER['REQUEST_SCHEME'], FILTER_SANITIZE_URL) . '://';
    $url = $scheme . $host;
    define('WP_CONTENT_URL', $url.WP_CONTENT_FOLDERNAME );

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

    so it looks like above. change ‘multi-content’ to the name of your wp-content folder.

    Then if you view the source of the page, all the URLs for images will be using the mapped domain not your main site domain URL.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.