Title: Code to Write to Wp-config.php
Last modified: August 21, 2016

---

# Code to Write to Wp-config.php

 *  [jeffvand](https://wordpress.org/support/users/jeffvand/)
 * (@jeffvand)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/code-to-write-to-wp-configphp/)
 * I would like to be write some code to add a line to my wp-config.php file automatically.
 * Background:
    I have about 100 sites that have no revision limitations on them.
   I would like to use ManageWP to just send over a code to add the following to
   my wp-config.php file (kind of like Super cache does when it is activated).
 *     ```
       /*Optimization Stuff */
       define('AUTOSAVE_INTERVAL', 120 );  // seconds (default is 60)
       define('WP_POST_REVISIONS', 5); // alter number of post revisions kept.
       ```
   
 * Does anyone know the php that would insert this code into the wp-config.php file?
   Thanks for any thoughts you have.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Vladimir Prelovac](https://wordpress.org/support/users/freediver/)
 * (@freediver)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/code-to-write-to-wp-configphp/#post-3964674)
 * Hi Jeff
 * One idea is to create a plugin containing these and any other setup lines you
   have and then distribute it with ManageWP over your sites.
 * Second one is actually modifying wp-config.php which I would advise against.
 * And third is having a bit more patience as all these options will be manageable
   through ManageWP in the future.
 *  Thread Starter [jeffvand](https://wordpress.org/support/users/jeffvand/)
 * (@jeffvand)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/code-to-write-to-wp-configphp/#post-3964679)
 * Oooh… do you know something about the map for these things? I can certainly be
   patient. 🙂

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Code to Write to Wp-config.php’ is closed to new replies.

## Tags

 * [wp-config.php](https://wordpress.org/support/topic-tag/wp-config-php/)

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 2 replies
 * 2 participants
 * Last reply from: [jeffvand](https://wordpress.org/support/users/jeffvand/)
 * Last activity: [12 years, 9 months ago](https://wordpress.org/support/topic/code-to-write-to-wp-configphp/#post-3964679)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
