Enabling Media / File Uploads for MediaWiki On Windows Server

This post is part of a series of posts about MediaWiki on Windows :

  1. Installing MediaWiki on Windows Server 2012 R2 Core
  2. Installing VisualEditor for MediaWiki on IIS
  3. Enabling Media / File Uploads For MediaWiki on Windows Server

Enable PHP File Uploads
Check that “file_uploads = On” is present in your PHP.ini file. It was already enabled in my installation. If you have followed the other guides in this series, the file should be here :
C:\Program Files (x86)\PHP\v5.4\php.ini

Set the temp file upload path in PHP.ini.
On Windows, if PHP was installed by WebPI this will be set to %SystemRoot%\Temp. It needs to be set the same as the “$wgTmpDirectory” var in the MediaWiki LocalSettings.php file. If you have followed the steps in my previous posts – you will have already added the correct permissions to this folder.

Permissions on the Upload Folder
I was following the guide here which suggests you need to change the permissions on the folder :
C:\inetpub\wwwroot\wiki\images however, it looks like permissions have been set correctly on the folder above and inherited down.

If your PHP.ini file needed a change, you will need to restart IIS on the server (to cause PHP to restart and read its config again). If not, you should be able to see a new option on the left hand menu on every wiki page called ‘Upload file’ – great step 1 complete! Now does it work? Clicking the link should take you to a page where you can choose a file to upload. Try uploading a file and ensure it renders correctly – if its an image.


3 thoughts on “Enabling Media / File Uploads for MediaWiki On Windows Server”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s