franciccio-ITALIANO Posted October 26, 2019 Share Posted October 26, 2019 Hi, I created many different .html, .js and .css files on my pc. Within each, there are many links to images and files stored in the standard "assets" folder on my PC. So my template on my pc works thanks to links like: "assets / img / myimage.png", or: "assets / js / myfile.js. Now I have to upload them to the server online and inside processwire. I manually created many .php template files, copied and re-glued into the html text, but no image or css file is loaded, because I have to manually change all the paths: for example, NOT "assets / img / myimage.png" BUT "site / assets / templates / styles / assets / img / myimage.png". It is very stressful to do this every time, so I thought of creating an "assets" folder not inside the "templates / styles / assets / ...." folder but right at the beginning of the folder structure, near the root and next to it. to the processwire "site" folder. In this way I can develop the html / css / js files of my site into a simple folder on my pc, and load them into processwire via filezilla without manually changing all the paths each time. Does this hurt processwire operation? I wouldn't put anything in the templates / styles folder! Link to comment Share on other sites More sharing options...
teppo Posted October 26, 2019 Share Posted October 26, 2019 Hey, Not a direct answer to your question, but rather a suggestion for a better workflow, as I can see that you're getting yourself into a bit of a mess here – and I think it can all be avoided. This is apparent from the questions you've been posting lately, and as such I really think you should rethink your approach. Basically it seems to me that you're developing a site as a static HTML website, and then on each "server push" transforming it manually to a ProcessWire site, converting HTML files to PHP template files etc. What you really should be doing instead is developing the site locally as a dynamic one – this is pretty much the only workflow that will work well without going through a lot of manual work, or setting up a very complex and fragile transformation process. In other words: set up a local development environment using WAMP (or something similar), install ProcessWire on it, build the site, and then push it to the production server. This way you don't have to worry about any of this tricky transformation stuff, or the resulting stress. Yes, it may take a while to set up (an hour or two even, if you've never done this before) but it's absolutely worth it ? -- A more direct answer: I don't think that what you're suggesting will "hurt" ProcessWire in any way. If you only upload a new folder to the root of the site, that's fine – just be careful not to accidentally remove this directory yourself if/when you update ProcessWire ? 3 Link to comment Share on other sites More sharing options...
franciccio-ITALIANO Posted October 26, 2019 Author Share Posted October 26, 2019 ok thanks a lot, in fact I should install wamp or something like that only at the moment I have a tired brain to engage in other things ... anyway as soon as I can ... thanks for the suggestion! ;) Link to comment Share on other sites More sharing options...
franciccio-ITALIANO Posted October 26, 2019 Author Share Posted October 26, 2019 but... with Wamp I must update with filezilla, right? Link to comment Share on other sites More sharing options...
teppo Posted October 26, 2019 Share Posted October 26, 2019 4 hours ago, franciccio-ITALIANO said: but... with Wamp I must update with filezilla, right? Yes, you'll still have to somehow upload the files of your site to the server. The main difference would be that you don't have to copy-paste markup from HTML files to PHP files and change paths or anything like that, as the site you're developing locally is essentially identical with the one you have online. Link to comment Share on other sites More sharing options...
dotnetic Posted October 26, 2019 Share Posted October 26, 2019 @teppo and @franciccio-ITALIANO 6 hours ago, teppo said: In other words: set up a local development environment using WAMP (or something similar), install ProcessWire on it, build the site, and then push it to the production server. This is exactly what I also replied here: 2 Link to comment Share on other sites More sharing options...
dragan Posted October 26, 2019 Share Posted October 26, 2019 7 hours ago, franciccio-ITALIANO said: but... with Wamp I must update with filezilla, right? Nothing against Filezilla, but I'd suggest you use WinSCP instead. But yes, you'll need some sort of FTP client. A good IDE can also watch out for you and automatically upload files to your server whenever a change is detected (new file being created or saved). Link to comment Share on other sites More sharing options...
franciccio-ITALIANO Posted October 27, 2019 Author Share Posted October 27, 2019 16 hours ago, dragan said: A good IDE can also watch out for you and automatically upload files to your server whenever a change is detected (new file being created or saved). Okay, thank you, everyone. Now let's try laragon. What Dragan says sounds very interesting to me. Is Filezilla an IDE? WinSCP is a better IDE that can do what you said, that is "automatically upload files to your server whenever a change is detected"? 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