Moving Flatpress to a new location in 1.5.1
Posted: Sun May 03, 2026 12:47 am
I've been using 1.3.1, and one of the things I loved about it was that I could take the complete blog folder and move it anywhere - different folder, copy it to localhost or upload to a new site, and it just worked - no fiddling required.
I upgraded to 1.5.1, and that is no longer true. If the configuration file does not show the exact complete url (or a blank), then changing anything about the url will prevent it from working. These are the kinds of error messages you may get:
"Fatal error: Uncaught Error: Failed opening required 'E:/htdocs/wdnew/blog150/fp-includes/fp-smartyplugins/\prefilter.postviews_assign.php' (include_path='E:/htdocs/blog152/') in E:\htdocs\blog152\fp-includes\core\core.smarty.php:275 Stack trace: #0 E:\htdocs\blog152\fp-includes\core\includes.php(19): fp_register_fp_plugins(Object(Smarty\Smarty), 'E:/htdocs/...') #1 E:\htdocs\blog152\index.php(3): include('E:\\htdocs\\..') #2 {main} thrown in E:\htdocs\blog152\fp-includes\core\core.smarty.php on line 275"
After about a day of trying various things, I believe I have a handle on it, and wanted to share what I learned for others who may have the same problem. I did a lot of experimenting by copying the install to a different folder name on my localhost, and figuring out what I needed to change.
Caveat: my fixes involve being able to edit config files directly, not through the interface. If you copy your install to a new location then these are the things you need to do to get it working again:
1. Edit \fp-content\config\settings.conf.php - at the top of that file you'll find something like
You'll need to change the www url to the exact url of your blog. Note, I found you could also make this a blank entry (keep the quote marks) and it would also work. And with the blank url, you can move it anywhere without having to edit this file again. Note - trying to set this to blank in the
Admin menu (admin.php?p=config), a blank URL is not allowed by the interface. But you can set it to blank by manually editing this file. Even with a blank url, you'll still need the next step after moving.
2. After any change in location, delete \fp-content\cache\smarty_plugins.index.php - this contains links to the previous location, and delivers errors such as the one above if it is not deleted.
That should do it, and your blog should be working in the new location. If not, I found one time I also had to edit \fp-defaults\settings-defaults.php to correct the url in it.
If you used a blank url in step one, and you are done moving things, you can now use the config menu item to enter the correct url. Just make sure it is the correct current url of your blog, or you'll be back to step 1 again.
I don't know at what version these new requirements became necessary, as I went directly from 1.3.1 to 1.5.1. I hope this saves someone some frustration.
Richard Cobb
Blacksburg, VA
I upgraded to 1.5.1, and that is no longer true. If the configuration file does not show the exact complete url (or a blank), then changing anything about the url will prevent it from working. These are the kinds of error messages you may get:
"Fatal error: Uncaught Error: Failed opening required 'E:/htdocs/wdnew/blog150/fp-includes/fp-smartyplugins/\prefilter.postviews_assign.php' (include_path='E:/htdocs/blog152/') in E:\htdocs\blog152\fp-includes\core\core.smarty.php:275 Stack trace: #0 E:\htdocs\blog152\fp-includes\core\includes.php(19): fp_register_fp_plugins(Object(Smarty\Smarty), 'E:/htdocs/...') #1 E:\htdocs\blog152\index.php(3): include('E:\\htdocs\\..') #2 {main} thrown in E:\htdocs\blog152\fp-includes\core\core.smarty.php on line 275"
After about a day of trying various things, I believe I have a handle on it, and wanted to share what I learned for others who may have the same problem. I did a lot of experimenting by copying the install to a different folder name on my localhost, and figuring out what I needed to change.
Caveat: my fixes involve being able to edit config files directly, not through the interface. If you copy your install to a new location then these are the things you need to do to get it working again:
1. Edit \fp-content\config\settings.conf.php - at the top of that file you'll find something like
Code: Select all
$fp_config = array (
'general' =>
array (
'www' => 'http://localhost/blog151',Admin menu (admin.php?p=config), a blank URL is not allowed by the interface. But you can set it to blank by manually editing this file. Even with a blank url, you'll still need the next step after moving.
2. After any change in location, delete \fp-content\cache\smarty_plugins.index.php - this contains links to the previous location, and delivers errors such as the one above if it is not deleted.
That should do it, and your blog should be working in the new location. If not, I found one time I also had to edit \fp-defaults\settings-defaults.php to correct the url in it.
If you used a blank url in step one, and you are done moving things, you can now use the config menu item to enter the correct url. Just make sure it is the correct current url of your blog, or you'll be back to step 1 again.
I don't know at what version these new requirements became necessary, as I went directly from 1.3.1 to 1.5.1. I hope this saves someone some frustration.
Richard Cobb
Blacksburg, VA