• The latest version of MMR (1.8.12 at the time of writing) relies on $_SERVER[‘DOCUMENT_ROOT’] to figure out the relative path to wp_content. This is not a good idea because $_SERVER[‘DOCUMENT_ROOT’] may not actually be part of WP_CONTENT_DIR (it is generally not a good idea to rely on anything in $_SERVER).

    Real world example (shared hosting on 1&1 Ionos, note that WP_CONTENT_DIR is not overridden anywhere):

    ABSPATH = /homepages/2/<user>/htdocs/wordpress/
    WP_CONTENT_DIR = /homepages/2/<user>/htdocs/wordpress/wp-content

    $_SERVER[‘DOCUMENT_ROOT’] = /kunden/homepages/2/<user>/htdocs/wordpress

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Please don’t rely on DOCUMENT_ROOT’ is closed to new replies.