Drupal way to edit site variables
You should not edit core code, ever.

For variables (set with variable_set) can try using something like strongarm module, or you can override using $conf in settings.php:

 /**
 * Variable overrides:
 *
 * To override specific entries in the 'variable' table for this site,
 * set them here. You usually don't need to use this feature. This is
 * useful in a configuration file for a vhost or directory, rather than
 * the default settings.php. Any configuration setting from the 'variable'
 * table can be given a new value. Note that any values you provide in
 * these variable overrides will not be modifiable from the Drupal
 * administration interface.
 *
 * The following overrides are examples:
 * - site_name: Defines the site's name.
 * - theme_default: Defines the default theme for this site.
 * - anonymous: Defines the human-readable name of anonymous users.
 * Remove the leading hash signs to enable.
 */
 $conf['site_name'] = 'My Drupal site';
 $conf['theme_default'] = 'garland';
 $conf['anonymous'] = 'Visitor';


This documentation is from default.settings.php.