Skip to main content
Post Undeleted by zok
added 640 characters in body
Source Link
zok
  • 153
  • 1
  • 8

I solved that by updatingTurns out the problem was with WP_CONTENT_URL, defined inside wp-config.php:

define( 'WP_CONTENT_URL', 'http://' . $_SERVER['HTTP_HOST'] . '/lab/WordPress-Skeleton/content' );

It seems that $_SERVER['HTTP_HOST'] is returning an incomplete path (notonly WP_CONTENT_DIRlocalhost without the folder) inside wp.

Since I'm using version control and using a local-config.php to define some local dev variables (like database credentials), I also placed this on it:

define( 'WP_CONTENT_URL', 'http://' . $_SERVER['HTTP_HOST'] . '/lab/WordPress-Skeleton/content' );

and on wp-config.php I added this check:

if ( !defined( 'WP_CONTENT_URL' ) )
    define( 'WP_CONTENT_URL', 'http://' . $_SERVER['HTTP_HOST'] . '/content' );

I solved that by updating WP_CONTENT_URL (not WP_CONTENT_DIR) inside wp-config.php.

Turns out the problem was with WP_CONTENT_URL, defined inside wp-config.php:

define( 'WP_CONTENT_URL', 'http://' . $_SERVER['HTTP_HOST'] . '/lab/WordPress-Skeleton/content' );

It seems that $_SERVER['HTTP_HOST'] is returning an incomplete path (only localhost without the folder).

Since I'm using version control and using a local-config.php to define some local dev variables (like database credentials), I also placed this on it:

define( 'WP_CONTENT_URL', 'http://' . $_SERVER['HTTP_HOST'] . '/lab/WordPress-Skeleton/content' );

and on wp-config.php I added this check:

if ( !defined( 'WP_CONTENT_URL' ) )
    define( 'WP_CONTENT_URL', 'http://' . $_SERVER['HTTP_HOST'] . '/content' );
Post Deleted by zok
Source Link
zok
  • 153
  • 1
  • 8

I solved that by updating WP_CONTENT_URL (not WP_CONTENT_DIR) inside wp-config.php.