Jump to content
  • 0

Editing the Index page



Hi! I am trying to edit code on the home page. The code on the page says (with "enable edit") that the code is on the index.php page, as you would expect. But when I open the page in an editor (I tried Sublime and Komodo), I get a page that does not have much code but instead has this written at the top.

This is the main web entry point for MediaWiki.
 * If you are reading this in your web browser, your server is probably
 * not configured correctly to run PHP applications!
 * See the README, INSTALL, and UPGRADE files for basic setup instructions
 * and pointers to the online documentation.

I have read the readme, install, and upgrades files, and searched around in databases, but I can't figure out how to get to the code that apparently is on this page. 

What am I doing wrong? 



Later Addition to this question/ post:

As I keep digging into this, I have a suspicion that I have been sent in the wrong direction with the statement "your server is probably not configured to correctly run PHP applications", as the message says. I suspect that the real issue is that the code for the Index page (and likely most of the pages) is WRAPPED/protected and therefore not able to be directly edited in any way, no matter what I do or how I configure my server. I suspect that the only way to "edit" these pages is to add on script that can be read along with the wrapped code, and the media-wiki community calls these add-on codes "applications", which explains why everything has to be done with applications that someone else has pre-created or you create yourself instead of just messing with the page code. IS THIS ACCURATE?




Edited by Carey (see edit history)
Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Do not edit any of the .php files that MediaWiki ships with. If you want to edit the content of your wiki pages, make use of the "Edit" tab while logged into your wiki.

If you want to implement custom code, write or install an extension. In any case, never edit the core .php files -- doing so will make future upgrades incredibly difficult as any custom modifications to core .php files are completely lost on upgrades and need to be reapplied (unlike extensions, which stick around). Furthermore, the core code changes in structure a lot between versions, and unless you're keeping up with MediaWiki development, your custom hack that works in one version may not work in the next one without significant rewrites.

Edited by Skizzerz (see edit history)
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.