kuba2 Posted January 13, 2019 Share Posted January 13, 2019 Hello I installed PW on my server and linked it to an existing database. I copied existing templates on the server into site/templates, but when I login to the backend in PW the templates do not appear. I can add them ( add new ) , but I want to duplicate an existing website and usually when I copied .php files in site/templates they would appear as templates in the backend. Has something changed with the new PW? I am very confused right now Thanks for any help Link to comment Share on other sites More sharing options...
bernhard Posted January 13, 2019 Share Posted January 13, 2019 Nothing has changed in this regard. But we have Duplicator now, that might help you: 1 Link to comment Share on other sites More sharing options...
kuba2 Posted January 13, 2019 Author Share Posted January 13, 2019 Thanks I have another issue A website I made has suddenly a "404 Not Found" message and I can't login to my backend. I changed only the password to the database, but put the new one into the config.php file. PW did an update....is it possible, that because of the update I can¨t login anymore? It is strange and I have no idea what is going on. Link to comment Share on other sites More sharing options...
Schwab Posted January 13, 2019 Share Posted January 13, 2019 The template files in /site/templates are for the frontend. The templates in the backend are created in the Processwire backend and are written into the database. You then assign the frontend template to the backend template. If you have no templates in your backend appearing, it means that they are not found in the database. So your problem may be the database. Link to comment Share on other sites More sharing options...
kuba2 Posted January 13, 2019 Author Share Posted January 13, 2019 I installed a new PW on the server and liked it to the existing database. Could it be, that it changed/deleted something in the existing database? Link to comment Share on other sites More sharing options...
Schwab Posted January 13, 2019 Share Posted January 13, 2019 7 minutes ago, kuba2 said: Thanks I have another issue A website I made has suddenly a "404 Not Found" message and I can't login to my backend. I changed only the password to the database, but put the new one into the config.php file. PW did an update....is it possible, that because of the update I can¨t login anymore? It is strange and I have no idea what is going on. Did you have a look at https://processwire.com/docs/start/install/upgrade/ for the upgrade? I suggest you add $config->debug = true; to your config.php to get more specific alerts. Link to comment Share on other sites More sharing options...
Schwab Posted January 13, 2019 Share Posted January 13, 2019 13 minutes ago, kuba2 said: I installed a new PW on the server and liked it to the existing database. Could it be, that it changed/deleted something in the existing database? If you used the install process at some point there appears a message, that the database has fields that get overwritten. In fact it is very red and clear. If you followed the process through, you deleted your existing templates in the database. Time to import a database backup I guess. Link to comment Share on other sites More sharing options...
kuba2 Posted January 13, 2019 Author Share Posted January 13, 2019 OK, thanks Link to comment Share on other sites More sharing options...
kuba2 Posted January 13, 2019 Author Share Posted January 13, 2019 Hello again I messed up. I have to remake my templates. The fields are stil intact. Is there a way I can restore all fields from my database? Link to comment Share on other sites More sharing options...
BFD Calendar Posted January 13, 2019 Share Posted January 13, 2019 If you want to move an existing PW site to another server I suggest http://modules.processwire.com/modules/process-export-profile/. I just used it for a site and it worked perfectly, copied all files, database, templates, modules and assets. And it's just about fool proof simple. I used Soma's install script (https://processwire.com/download/core/), easiest way to get going. 1 Link to comment Share on other sites More sharing options...
psy Posted January 14, 2019 Share Posted January 14, 2019 @kuba2 after copying your files to the new location, did you change the $config->httpHosts array so PW knows were to look for the files? 1 Link to comment Share on other sites More sharing options...
kuba2 Posted January 21, 2019 Author Share Posted January 21, 2019 Hey thanks for alle the help. I rebuilt my templates. The site wasn't big fortunately. I have learned a lot. All the best Link to comment Share on other sites More sharing options...
kuba2 Posted January 21, 2019 Author Share Posted January 21, 2019 On 1/14/2019 at 9:34 PM, psy said: @kuba2 after copying your files to the new location, did you change the $config->httpHosts array so PW knows were to look for the files? Yes I did. I deleted my templates in the database. Most elaborate and unnecessary way to learn about databases i guess ? 2 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now