Title: [Plugin: New URL Mover] functions.php problem
Last modified: August 20, 2016

---

# [Plugin: New URL Mover] functions.php problem

 *  [Suranappar](https://wordpress.org/support/users/suranappar/)
 * (@suranappar)
 * [15 years ago](https://wordpress.org/support/topic/plugin-new-url-mover-functionsphp-problem/)
 * When I add this
    <?php define(‘ROOT_URL’,get_option(‘ROOT_URL’)); ?> to the functions.
   php, I get an error on line 325 (324) and pages don’t load.
 * [http://wordpress.org/extend/plugins/new-url-mover/](http://wordpress.org/extend/plugins/new-url-mover/)

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

 *  [SAHIL](https://wordpress.org/support/users/sahilph/)
 * (@sahilph)
 * [15 years ago](https://wordpress.org/support/topic/plugin-new-url-mover-functionsphp-problem/#post-2085498)
 * Try this:
 * > <?php define(‘ROOT_URL’,get_option(‘home’)); ?>
 * or
 * > <?php define(‘ROOT_URL’,site_url()); ?>
 *  Thread Starter [Suranappar](https://wordpress.org/support/users/suranappar/)
 * (@suranappar)
 * [15 years ago](https://wordpress.org/support/topic/plugin-new-url-mover-functionsphp-problem/#post-2085543)
 * <?php define(‘ROOT_URL’,get_option(‘home’)); ?>
    <?php /** * Main WordPress API
 * Result
 * Fatal error: Call to undefined function apply_filters() in /home/suranapp/public_html/
   site/wp-includes/functions.php on line 325
 * ===
 * <?php define(‘ROOT_URL’,site_url()); ?>
    <?php /** * Main WordPress API
 * Result
 * Fatal error: Call to undefined function site_url() in /home/suranapp
    /public_html/
   site/wp-includes/functions.php on line 1
 * ===
 * <?php define(‘ROOT_URL’,get_option(‘ROOT_URL’)); ?>
    <?php /** * Main WordPress
   API
 * Result
 * Fatal error: Call to undefined function apply_filters() in /home/suranapp/public_html/
   site/wp-includes/functions.php on line 325
 *  Thread Starter [Suranappar](https://wordpress.org/support/users/suranappar/)
 * (@suranappar)
 * [15 years ago](https://wordpress.org/support/topic/plugin-new-url-mover-functionsphp-problem/#post-2085545)
 * This is from a file called error.log
 * [17-May-2011 08:13:07] PHP Fatal error: Call to undefined function apply_filters()
   in /home/suranapp/public_html/site/wp-includes/functions.php on line 324
    [17-
   May-2011 08:13:12] PHP Fatal error: Call to undefined function apply_filters()
   in /home/suranapp/public_html/site/wp-includes/functions.php on line 324 [17-
   May-2011 08:14:15] PHP Fatal error: Call to undefined function apply_filters()
   in /home/suranapp/public_html/site/wp-includes/functions.php on line 324 [17-
   May-2011 08:14:19] PHP Fatal error: Call to undefined function apply_filters()
   in /home/suranapp/public_html/site/wp-includes/functions.php on line 324 [17-
   May-2011 13:58:09] PHP Fatal error: Call to undefined function apply_filters()
   in /home/suranapp/public_html/site/wp-includes/functions.php on line 325 [17-
   May-2011 13:59:53] PHP Fatal error: Call to undefined function site_url() in /
   home/suranapp/public_html/site/wp-includes/functions.php on line 1 [17-May-2011
   14:02:05] PHP Fatal error: Call to undefined function apply_filters() in /home/
   suranapp/public_html/site/wp-includes/functions.php on line 325
 *  [SAHIL](https://wordpress.org/support/users/sahilph/)
 * (@sahilph)
 * [15 years ago](https://wordpress.org/support/topic/plugin-new-url-mover-functionsphp-problem/#post-2085563)
 * does this plugin work without adding any line to functions.php ??
 *  Thread Starter [Suranappar](https://wordpress.org/support/users/suranappar/)
 * (@suranappar)
 * [15 years ago](https://wordpress.org/support/topic/plugin-new-url-mover-functionsphp-problem/#post-2085584)
 * I do not know, without that line I do not get any errors. But I do not have any
   indication on what ever or not it works. Is there a simple way to check, part
   from moving the site?
 *  Plugin Author [ThoughtLab](https://wordpress.org/support/users/thoughtlabllc/)
 * (@thoughtlabllc)
 * [15 years ago](https://wordpress.org/support/topic/plugin-new-url-mover-functionsphp-problem/#post-2085594)
 * This plugin will only set your ‘home’ and ‘siteurl’ values in your database if
   it discovers that your index.php file is in a different location from what they
   are currently set. So, if you move your WordPress site into a subfolder, all 
   you have to do is navigate to the new location of your index.php, and it will
   automatically set those values.
 * The ROOT_URL value is meant for the url of your main site, if your blog is somewhere
   else. At ThoughtLab, we develop blogs on a separate development server from the
   main site. During that time, we set the ‘ROOT_URL’ variable to the IP Address
   of the main site. This way, any changes to the css are only made once, and they
   automatically carry over to the blog. When the site is ready to go live, we move
   the site and the blog to a single live server, and we have to update the url 
   in the database, and update the ROOT_URL variable to match. So, I created this
   plugin to take care of that process for us.
 * This plugin doesn’t use the ‘apply_filters()’ function of WordPress, so I’m not
   sure why you would get that error. You may want to try to define the global constant
   as something other than ‘ROOT_URL.’ try ‘MAIN_SITE’ or ‘SITE_URL’ or something
   equally descriptive.
 *  Thread Starter [Suranappar](https://wordpress.org/support/users/suranappar/)
 * (@suranappar)
 * [15 years ago](https://wordpress.org/support/topic/plugin-new-url-mover-functionsphp-problem/#post-2085595)
 * Not sure I got this right but.
 * Move [http://suranappar.donk.in/site/](http://suranappar.donk.in/site/)
    to [http://suranappar.donk.in/site2/](http://suranappar.donk.in/site2/)
   then run index.php should be a working WordPress site and not just a text version?
 * In that case it do not work.
    All links in the new one goes to old location.
 * Changed back to site again and it works, so I take it database did not get tuched
   at all.
 * Are there any known crashes or error due to other plug-ins?
    I use WordPress.
   org Stats thinga, can that one affect any?
 * And yah, I am about to move later on. I been moving a lot from free hosting to
   free hosting, and had to update the database with a text replacer for smoothies
   move. But sometimes it left old paths in database wich whould casue problems.
   I am soon to move to a pai hosting, thought this one could help me out and save
   some time.
 *  Thread Starter [Suranappar](https://wordpress.org/support/users/suranappar/)
 * (@suranappar)
 * [15 years ago](https://wordpress.org/support/topic/plugin-new-url-mover-functionsphp-problem/#post-2085599)
 * This is my pressent plug-in list.
 * Active onces:
    Akismet Akismet Credit Inserter ContentShare Fast Secure Contact
   Form GTranslate New URL Mover WangGuard WordPress.com Stats
 * InActive onces:
    Akismet htaccess writer W3 Total Cache WordPress Importer
 *  Thread Starter [Suranappar](https://wordpress.org/support/users/suranappar/)
 * (@suranappar)
 * [15 years ago](https://wordpress.org/support/topic/plugin-new-url-mover-functionsphp-problem/#post-2085689)
 * ** Can be removed **
 *  Plugin Author [ThoughtLab](https://wordpress.org/support/users/thoughtlabllc/)
 * (@thoughtlabllc)
 * [15 years ago](https://wordpress.org/support/topic/plugin-new-url-mover-functionsphp-problem/#post-2085697)
 * anywhere in your theme that bloginfo(‘url’) is used, should echo out the new 
   url. If you moved your site from example.net to example.net/blog then you would
   navigate to example.net/blog to update your database. You may also need to open
   up the permalinks option page in your admin, and save the settings again, since
   the permalinks aren’t updated until you either save a post (which updates only
   that post) or save the permalink settings (which will update them all). Doing
   so should update all your permalinks to the new url.
 * We will look into automating this process.

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

The topic ‘[Plugin: New URL Mover] functions.php problem’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/new-url-mover.svg)
 * [New URL Mover](https://wordpress.org/plugins/new-url-mover/)
 * [Support Threads](https://wordpress.org/support/plugin/new-url-mover/)
 * [Active Topics](https://wordpress.org/support/plugin/new-url-mover/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/new-url-mover/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/new-url-mover/reviews/)

 * 10 replies
 * 3 participants
 * Last reply from: [ThoughtLab](https://wordpress.org/support/users/thoughtlabllc/)
 * Last activity: [15 years ago](https://wordpress.org/support/topic/plugin-new-url-mover-functionsphp-problem/#post-2085697)
 * Status: not resolved