The Chillidog Software Blog

The ramblings of a developer

Pro-tip: Manage your php.ini in RapidWeaver

One of the most common questions I get for weaverFM is:

  • What is a php.ini file?
  • Why do I want to use a php.ini file?
  • How do I create a php.ini file?

The answers are:

  • A php.ini file is a configuration file for php. It can be used to configure php at runtime. Therefore, you can override settings such as max file upload size quickly AND easily!
  • You may want to configure php on a per-directory basis. I typically use it to override the location of my php error log and set the max upload sizes.
  • That’s where this pro-tip will come in! Read on below for how to do manage your php.ini file directly in RapidWeaver!

Step 1 - Add a HTML page

Turn off Theme styling

Step 2 - Turn off Theme styling

In the page options turn off the theme styling for the page.

Set file and folder name

Step 3 - Set file and folder name

In the general options, set the name of the file to php.ini and the folder to /. You will also want to disable ‘Show in menu’.

Configure php

Step 4 - Configure php

In this example we will be increasing the upload limit for php to 20MB. The two values we need to adjust are:

  1. upload_max_filesize
  2. post_max_size

A good resource on this is this drupal guide.

Publish & Go!

Step 5 - Publish & Go!

The next time you publish your page you should see a file called php.ini in the root directory of your website!