I installed, configured, and populated MediaWiki on localhost and have been maintaining my wiki locally for 4 years. Today I simply dragged the mediawiki folder into a subfolder I created for better organization and now the site is broken.


Here are the debugs at the top (they were the exact same messages before, just a different path now, as noted below).

Top of Page:

hepperlepedia2 localhost: PHP debugging errors, top

Bottom of Page:

hepperlepedia2 localhost: PHP debugging errors, bottom

NOTE: The errors at the top are about continue vs break statements, whereas the bottom errors are mostly "cannot modify headers"

What I've Tried Already

  1. Changed $wgScriptPath from

$wgScriptPath = "/hepperlepedia2" to $wgScriptPath = "/sub/wiki/hepperlepedia2"

  1. Tried following MediaWiki directions. This page says directions for moving a wiki into a subfolder are here: https://stackoverflow.com/questions/4763909/mediawiki-on-subdirectory-and-subdomain. I followed these steps:
  • (Already modified $wgScriptPath as indicated above)
  • Restarted WampServer, which restarted apache
  • Navigated to http://localhost/sub/wiki/hepperlepedia2/

MediaWiki on SubDirectory and SubDomain

Note, the site worked fine -- nothing was changed moving the mediawiki folder ("hepperlepedia2") into a subfolder. That's when I started getting all these debug errors.

My Question

I know that the debug screen means the path to the home/main/index page of the wiki must be working. But, why am I getting all these errors on things I didn't even change? If changing $wgScriptPath in LocalSettings.php didn't prevent these errors, what will? I suspect there is a setting or variable value somewhere that needs to be set, but I don't know what it would be.

  • Which version of MediaWiki and PHP do you use? Dec 18, 2021 at 9:28
  • @AlexanderMashin Your question seems to indicate that an update to a different version might help. But, why would that be when that wiki install used to work just fine. I didn't change anything in that codebase. If I didn't change anything there, what else could be affecting it? Feb 5, 2022 at 19:46


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.