Title: How do I replace the plugin version number in functions.php dynamically?
Last modified: August 19, 2016

---

# How do I replace the plugin version number in functions.php dynamically?

 *  [craigedmonds](https://wordpress.org/support/users/craigedmonds/)
 * (@craigedmonds)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/how-do-i-replace-the-plugin-version-number-in-functionsphp-dynamically/)
 * I am building a plugin.
 * I have a text file called version.txt sitting in the plugin folder. Contents 
   of version.txt file is 1.0.1. With php I can read the file no problems.
 * Currently inside the functions.php, the version number is hard coded but I wanted
   to use the contents of the version.txt file to populate it instead, so that rather
   than hard coding the version into functions.php, I would just update version.
   txt file.
 *     ```
       /*
       Plugin Name: my plugin name
       Description: version desciption
       Version: $version_number
       Author: me
       Author URI: http://www.mywebsite.com
       Plugin URI: http://www.mywebsite.es
       */
       ```
   
 * I have tried all methods of populating version number but wordpress outputs any
   dynamic code in that section as plain text.
 * Any ideas?
 * Kindest Regards
    Craig Edmonds

The topic ‘How do I replace the plugin version number in functions.php dynamically?’
is closed to new replies.

## Tags

 * [plugin version](https://wordpress.org/support/topic-tag/plugin-version/)

 * 0 replies
 * 1 participant
 * Last reply from: [craigedmonds](https://wordpress.org/support/users/craigedmonds/)
 * Last activity: [15 years, 3 months ago](https://wordpress.org/support/topic/how-do-i-replace-the-plugin-version-number-in-functionsphp-dynamically/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
