Jump to content

How you work with pw on external server


olivetree
 Share

Recommended Posts

I'm with Jan here. I have a local copy of the files I'm working on (templates, modules, assets etc) and then ftp them from VSCode using the SFTP extension.

I don't have the files upload automatically when they're saved but my muscle memory for uploading a file on save is good.

I've tried using Remote Host in VSCode and occasionally use continuous integration with GitHub but for most of my projects that's overkill.

  • Like 1
Link to comment
Share on other sites

Configure the repository cloud provider (gitlab, github, etc) to use pipelines to upload with rsync on commit of main branch. If it's content stuff, I assume I have to go do it manually or create a migration that adds new fields, templates, new pages, etc. 

  • Like 2
Link to comment
Share on other sites

Many thanks @elabx @Sanyaissues @millipedia @TomPich @Jan Romero for your different views and workflows how you work with Pw and a external server.
That is really helpful for me, because up to now all content, code, structure and templates were handled and setup on my previous CMSes I used.
With PW it seams to be a bit different and I thought perhaps there are one or two best practices. But thanks to your answers I found a whole bunch of great possibilities. So cool. For me as pw beginner it's like starting with PW itself, I have to find my best way how to work and manage things with PW. 

Link to comment
Share on other sites

1 hour ago, olivetree said:

That is really helpful for me, because up to now all content, code, structure and templates were handled and setup on my previous CMSes I used.

How did you use to do it? I think most of our solutions should apply to any PHP based CMS.

  • Like 3
Link to comment
Share on other sites

11 minutes ago, elabx said:

How did you used to do it? I think most of our solutions should apply to any PHP based CMS.

Thats true @elabx. I am coming from Bludit and WP, which were installed via hosters applications (softaculous) or one time via upload into the webdirectory. Then everything I've configured through the WebUI and optically adjusted through themes via an theme editor (wp greenshift odr livecanvas). I had a staging and an production instance, so everything took place on the external servers (and backups of course). I really seldom used an ftp/sftp access anymore or took the way via git like you mentioned configuring a website. It was no need for.  I first read about DDEV in this forum, which seams quite interesting.

Many thanks @bernhard for adding your RockMigrations deployment -> the collection of possible ways of work is still growing in all directions;-) 

Thats why I asked how you all work in my metnioned case, just to become an impression and ideas how others work/handle with pw. Because on the first sight as pw beginner, I had the idea everything is happening in the pw admin gui like in other CMSes. I recognize that there are workflows were a "click and configure" are not as efficient or effective as an API or local dev or so. I like that learning curve;-)  

Link to comment
Share on other sites

2 minutes ago, olivetree said:

Then everything I've configured through the WebUI and optically adjusted through themes via an theme editor (wp greenshift odr livecanvas). I had a staging and an production instance, so everything took place on the external servers (and backups of course). I really seldom used an ftp/sftp access anymore or took the way via git like you mentioned configuring a website. It was no need for. 

Thanks for sharing! That's a nice setup I get it now! I

Wouldn't these tools support ProcessWire? (I remember it being available on Softaculous) Or are some parts of these tools tightly integrated with Wordpress/Bludit? 

  • Like 1
Link to comment
Share on other sites

15 minutes ago, elabx said:

Thanks for sharing! That's a nice setup I get it now! I

Wouldn't these tools support ProcessWire? (I remember it being available on Softaculous) Or are some parts of these tools tightly integrated with Wordpress/Bludit? 

I am not a deep diving webdev like many of you. With WP I learnt many things about Bootstrap (used it via Livecanvas Builder) and build some things with CSS frameworks (Pure and Bulma). I decided to build my own website with another tool from ground up with pw;-) 
  
Since PW is available via Softaculous for the first steps its ok (install, db, and try pw admin), since it installes the intermediate site-profile, but then I wanted to go through the Pw install process itself, tested around, installed pw many times, installed different site-profiles to discover the different output strategies and tested  @bernhards cool site-rockfrontend. And enjoy this friendly community with soooo many hints and ideas, even for PW beginners. Really great.

  • Like 2
Link to comment
Share on other sites

Hey @olivetree!

You can use Remote development plugin for VS Code. This way you can work on your staging (or prod if you like cowbow coding)) from a locally installed VS Code via ssh. It install VS Code server on a remote machine and connects to it. So you do not need to have anything but VS Code locally.

There is similar thing in PhpStorm I know nothing more about)

  • Like 1
Link to comment
Share on other sites

@Ivan GretskyI used to do Cowboy Coding (just learn the term! Love it) all the time, using Cloud9, so I only needed my browser to code. Then I switched to VsCode and remote development, but extensions started eating up my small server instance's memory (The default @builtin TypeScript extension is a RAM monster! and I wasn't even using it!). I spend half my time monitoring server-side extensions... until I finally made the switch to DDEV.

1 hour ago, bernhard said:

That's definitely in my next-to-try list @bernhard

  • Like 2
Link to comment
Share on other sites

I also like the "cowboy coding" term, but I want to add that VSCode remote can not only be used for cowboy coding but also for - I don't know how to say - regular tasks!

I'm using it on a regular basis to do different things on my servers that I manage. It's great, for example, for editing files that are not part of the automated deployment - eg /site/config-local.php

Browsing files, moving folders, searching for keywords in the codebase, temporarily adding something to the codebase, etc.; All of that is extremely comfortable to do with VSCode compared to doing it on the command line.

So it's definitely a tool that is worth to have and worth to know!

  • Like 1
Link to comment
Share on other sites

14 hours ago, Sanyaissues said:

Then I switched to VsCode and remote development, but extensions started eating up my small server instance's memory (The default @builtin TypeScript extension is a RAM monster! and I wasn't even using it!). I spend half my time monitoring server-side extensions.

I have recently had the same experience. In my case it looked like the culprit was DevSense PHP Tools. I gave up on it but the problem persisted with PHP Intelephense. Finally I gave up and went back to local development and set up a CICD with GitHub Actions which watches my main branch and pushes stuff to the server when main branch is updated. Works a treat!

  • Like 1
Link to comment
Share on other sites

Vmany thanks @kongondo for your additional workstyle. VSCode seams to be definitely a nice tool.  But I didnt reach the resource bottlenecks yet.

For some config centric sysadmin work I used Sublime Text editor with Remote Subl and rmate on server, which let you work via ssh on external instances. I liked it configurability, I guess its the same work style like Vscode and remote dev. 

Currently I like the idea of a mix of using Vscode with its comfortable extensions and possibly I will stepwise adding the local ddev functionality, with those ingredients whats needed then.

  • Like 1
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...