-
Posts
1,450 -
Joined
-
Last visited
-
Days Won
9
Everything posted by Peter Knight
-
Recommended way to move installation from local to production server
Peter Knight replied to _Roy_'s topic in Getting Started
No probs. Just out of curiosity, who are you hosting with as I recall some hosts have weird setups. I recall GoDaddy in particular caused me issues before. Nothing some htaccess wrangling didn’t fix but a head scratcher at the beginning. -
Recommended way to move installation from local to production server
Peter Knight replied to _Roy_'s topic in Getting Started
@_Roy_ how did it go? -
Possibly it can or could. It could simply be bad prompts which led to non optimal solutions. I’ll ask it later 🤖
-
On a side note, because of the ProcessWire 'way' of handling images to think about the purpose of the images your page will have. As teppo flagged. So I usually have 1 x carousel images or a hero image field 1 x general images field i might display in the content 1 x something else The reason for doing this is that you can keep all your images and image field settings appropriate for the image purpose etc. Especially if you have clients adding or removing images. I find having just one image field can be an issue if they accidentally remove something or add an image which should not be part of the hero banner etc. Later on you might want to also look at tagging images and calling them onto your front-end pages https://processwire.com/modules/textformatter-image-tags/ But I'd recommend getting used to the basics first. An example of how I use image tagging might be. I have a product field with a lot of general images one of them in particular is used as a preview thumb on a product overview page so i'll tag that image 'preview' or whatever you want really. Lets us know how it goes
-
Recommended way to move installation from local to production server
Peter Knight replied to _Roy_'s topic in Getting Started
I usually do this and it simplifies things if your local and remote credentials are the same. 1. Turn on errors on your config file to make trouble shooting easier 2. Zip up all your local files and ensure to get your htaccess too 3. Export the local database and import it into the remote plesk server or whatever you’re using 4. Set up remote database credentials 5. unzip remote files From that point onwards, I might have some htaccess issues or I might need to look at site logs etc but most of the time it goes smoothly enough. You’re installing onto a blank site right? If there is an existing site in the webspace which you didn’t create, ensure to rename the index.html page -
Hey a UI/UX question if anyone wants to chip in. Does this make sense? Rich Text Editors (normal flow) You click the Add Image button in TinyMCE, and the Select image window opens. You see a list of images associated with that page (only). Rich Text Editors (with MediaHub) With MediaHub, I'm no longer restricted to showing only the images attached to a page's fields. But that raises a UX question: clients are used to seeing just a handful of images tied to the page they're editing. Presenting hundreds of Library assets upfront and asking them to sort and filter isn't an improvement...if it's a sorting and filtering burden. The better approach is two tabs? On this page for the assets already attached to the current page, and MediaHub (or Library) for the full collection? Or should I only display the entire library with the users' page images positioned at the top for convenience? Cheers P
-
From Cursor below. You'll be please to note it's impressed with your question 🙂 Good question! It's entirely home-baked. The CLI is a custom PHP script (PwMcp/bin/pw-mcp.php) that bootstraps ProcessWire directly, and routes commands through a CommandRouter class (PwMcp/src/Cli/CommandRouter.php). It's purpose-built for the MCP workflow - the Node.js MCP server shells out to PHP, passes structured arguments, and gets JSON back. It doesn't use WireCLI, ProcessWire Console, or RockShell. Those are general-purpose CLI tools for ProcessWire. The PW-MCP CLI is narrowly focused on the specific commands the AI agent needs: reading pages, querying selectors, listing templates/fields, exporting schema, and syncing content. It speaks JSON natively (no human-friendly formatting to parse) and is designed to be called programmatically by the MCP server rather than by a human in a terminal. The architecture is: Cursor Chat → MCP Server (Node.js/TypeScript) → CLI (PHP) → ProcessWire API For remote sites, the CLI layer is bypassed entirely - the Node.js server makes HTTP POST requests to pw-mcp-api.php, which bootstraps ProcessWire and runs the same CommandRouter directly: Cursor Chat → MCP Server (Node.js) → HTTP POST → pw-mcp-api.php → ProcessWire API So the CLI is really just the local transport mechanism. The actual logic lives in the CommandRouter and related PHP classes, which are shared between both the local CLI and remote HTTP paths.
-
Oh and I had an n8n automation set up recently. You can run n8n for free locally so I did a little experiment… local n8n workflow is scheduled to run every X minutes contacts my live site creates an unpublished post in a predetermined location sends me a slack notification confirming page created That’s the real reason that the Module exists. So if you want to, you can create content at scale automatically. Nothing to stop you integrating keyword and competitor research into the mix and experimenting with programmatic SEO (pSEO). Maybe I should add that to the AI thread?
-
Latest updates. I had somewhat foolishly left development of the RTE integration until late in the day. But this week I am almost done with TinyMCE integration and a custom button on the toolbar. Initially I had planned on this flow user clicks the RTE media hub icon (insert image) A popup appears which displays images from the other fields on that page im so conditioned to this pattern that I overlooked something obvious. Why display just the images on a page when Media Hub can display all images in your hub? 🧐 Somehwhat unnecessarily, we’re asking clients to add an image to a field(s) Select insert image select image from step 1 again I’ll add a screenshot of the solution tomorrow. Would appreciate a second pair of eyeballs on this if anyone has time. P
-
Hey @gebeer Yes, it's pretty wild and fun to watch sites being built by AI. Frightening too obviously ! I created an entire blog last week without touching the admin. Templates, fields, test content, pages etc created in about 5 mins. And 4 minutes of that were typing my instructions. But you could always save it as a 'recipe' and reuse it. No worries. I don't mind questions. 🙂 Yep, the JSON schema approach is a wrapper around the PW fields and templates API. It can create/update fields (type, label, description, inputfield settings) and templates (fields, family settings like allowChildren, urlSegments, etc.). Re. roles/permissions or module install/uninstall, I didn't need those. My workflow is quite simple, thankfully and doesn't involve clients updating their sites. I haven't used RockMigrations, but knowing Bernard's reputation, I imagine RockMigrations is significantly more comprehensive in that regard. Regarding the question about AppAPI Vs HTTP API, I had to ask the robots about that one and the reply is comprehensive but possibly not what you were asking. See below, but you're probably already familiar with the AppAPI stuff. BTW the Module isn't commercial, and anyone can try it. I want to clean up the repo before opening it up for wider use. Is the above any help to you? Did it answer your questions?
-
That looks interesting. I’d be curious how it affects analytics, Google tag manager and conversion tracking. 🧐
-
WebP as source/input images - expected behaviour?
Peter Knight replied to Peter Knight's topic in General Support
Hey thanks for the link. Neat module. Was there a technical or philosophical issue with support for webp as input source image? -
MediaHub update.... TL;DR: MediaHub fields can now detect and import images used on the same page. A per-field import button scans other image fields on the same page and intelligently matches against the MediaHub library. It includes deduplication, perceptual hashing, and confidence badges. This saves significant manual effort when transitioning from standard image fields to MediaHub fields — i.e., you can run both in tandem while evaluating, or until you're ready to switch. I made the jump from building MediaHub to implementing it on a real client site. I ran into issues, and those pain points led to new features. It's a different experience switching from testing with Instagram images to deploying on a 15+-year-old client ProcessWire site — a significant commercial site that can't afford downtime. It features blog posts, staff photos, services, and the usual content you'd expect on a professional services site. Having more on the line meant I approached it with greater scrutiny, taking things slowly — up to a point. My approach: Add a MediaHub field on every page beneath the existing images field. Import each image individually (tedious, but reassuring). Add a script that outputs the MediaHub image first, falling back to a standard image if the MH API had issues. Apply data-type=mediahub to the HTML so I could quickly identify which images had yet to be ported. Step 2 became tedious once I'd confirmed the core functionality was solid. I already have a global import function that scans a site and imports existing images. But I wanted something different for this workflow. If I were an agency porting an entire site, what would be the most useful feature? How would I migrate one page at a time and confirm it was working, rather than relying on the global import? The answer was a localised import button on the MediaHub field itself. Pressing the import button scans existing image fields on the same page and opens a modal containing a list of images available to add to both MediaHub and the MediaHub field. It doesn't yet support Matrix pages, though it works correctly within a Matrix field. The modal assesses whether each asset already exists in MediaHub. Avoiding duplicate images is a core principle of MediaHub, so getting this right mattered. It handles most cases correctly. The one gap: images with different crops are treated as separate images — technically accurate, but better crop detection would be more useful in practice. That's next on the list.
-
Hi, I have a question regarding WebP support that I would like to clarify. I added WebP to my allowed image extensions, and while uploads work fine and the original images display correctly, I'm seeing "not a supported image type" errors when ProcessWire tries to generate thumbnails or variations from WebP source files. After some digging, I found Ryan's blog post from 2019 which says: > "WEBP is purely an output format, not an input format... PNG and/or JPG images should still be the standard for any images you upload to your site." So it sounds like this is expected behaviour - WebP is designed for output (converting JPG/PNG → WebP for delivery) rather than input (uploading WebP and resizing it). Just wanted to confirm: Is this still the case in 2026? Is there any plan to support WebP as a source format in the future? For those who do allow WebP uploads - do you just accept that variations won't be generated? For now, I'm working around it by skipping resize attempts on WebP source images and using the originals, which works fine but results in larger file transfers for thumbnails. Thanks! Peter
-
How to Leverage AI for Smarter ProcessWire Development
Peter Knight replied to bernhard's topic in Dev Talk
From what I know about MCP, it should, but I only use Cursor, so I can't confirm. -
Ryan, is this Module still usable? The link on the intro is pointing to an old/unfound page.
-
Some updates to the MediaHub module I've added an import tool that lets you pull in all the existing images on your ProcessWire site without having to re-upload anything manually. If you've been running PW for a while before installing Media Hub, you'll probably have images spread across dozens of pages and fields, and doing that by hand is nobody's idea of a good time. The new Import tab (v104) scans every image field on your site, shows you what's out there in a nice table with thumbnails, dimensions, file sizes, which page and field each image belongs to, and crucially flags potential duplicates. So you can spot that the same hero image has been uploaded to 12 different pages and just import one copy. You can filter by field, template, or search by name, then select what you want and batch import the lot with a progress bar. There's also an Import by URL option if you've got images sitting on your server or hosted elsewhere that you want to bring in directly. Nothing groundbreaking, just one of those quality-of-life things that makes the difference between a module people install and a module people actually use.
-
How to Leverage AI for Smarter ProcessWire Development
Peter Knight replied to bernhard's topic in Dev Talk
And I created an almost identical blog post about the module using the module, without opening the CMS admin once. That's the demo/use case right there. -
Ok done. MCP Module now support local->remote publishing. I guess there's not a big demand for this, but I find it really useful.
-
How to Leverage AI for Smarter ProcessWire Development
Peter Knight replied to bernhard's topic in Dev Talk
Hey, if anyone is using Cursor for AI development, I just added some interesting functionality to the MCP module, including full 360 local/remote sync. -
Some updates to the Processwire / Cursor MCP Module. But first a recap (composed by Cursor) ProcessWire MCP — 360 Content Sync Between Cursor and Any ProcessWire Site With this Cursor MCP module for ProcessWire, you can say "Pull the about page, update the intro, and push it to production" — and Cursor does exactly that. No CMS login, no FTP, no copy-paste between environments. The module gives Cursor full read and write access to any ProcessWire site — local or remote — via a secure API. Pull pages down as editable YAML files, make changes in your IDE, and push them back. Or go the other direction: scaffold new pages locally and publish them to production in bulk. Fields and templates sync the same way, with diff previews and dry-run support before anything is written. The practical result is a genuine 360 workflow — content and structure moving freely between your local dev environment and any live site, driven entirely by natural language prompts in Cursor. What's new in this release: Remote site connection Cursor can now connect directly to any live ProcessWire site over HTTPS. Previously all MCP tools only worked against your local database — remote changes meant logging into the CMS admin manually. Now a single configured API endpoint is all that's needed. Schema sync — push, pull, diff Field and template definitions are exported as versioned JSON files. Compare your local schema against production, see exactly what would change, and push with a single prompt. Think of it as Prisma migrations for ProcessWire. Previously adding a new field to production meant recreating it by hand in the admin and hoping it matched local. Page content sync — pull Any live page can be pulled down to a local YAML file. Your content is now code — version-controlled, editable in your IDE, and diffable like any other file. Previously content only lived in the database and the only way to edit it was through the CMS. Page content sync — push Edit content locally and push it back to local, production, or both simultaneously. Dry-run is on by default so you see exactly what will change before it's applied. Cursor writes directly to the ProcessWire database via the API — the CMS admin is never involved. Create and publish pages remotely — without touching the CMS Scaffold a new page in Cursor, write the content, and publish it directly to production in one step. Template, parent, name, fields, and published status are all set via a single prompt. This is the foundation for more powerful automated workflows — bulk landing page generation, scheduled blog publishing, or programmatic content pipelines driven by keyword data or external feeds. Cross-environment page reference resolution Pages that reference other pages (a homepage featuring service pages, for example) previously stored those relationships as raw database IDs. Those IDs differ between local and production, so pushing a page reference to a different environment would silently link to the wrong page — or nothing at all. References are now stored with their URL path and resolved correctly on whatever environment receives the push. Pre-push reference validation Before any push, a new pw_validate_refs tool scans every synced page and checks that all page references actually exist on the target environment. It reports missing references (which would blank the field on push) and unpublished references (valid but hidden) separately. Previously a broken reference had no way to surface until it caused a visible problem on the live site. Coming next The next phase adds a staging environment tier (local → staging → production promotion), matrix and repeater item sync, and autonomous content publishing — where an external scheduled process generates and publishes SEO-optimised content directly to ProcessWire without Cursor or the CMS admin being open at all.
-
How to Leverage AI for Smarter ProcessWire Development
Peter Knight replied to bernhard's topic in Dev Talk
I really like Sublime text. Slightly OT but have you tried Nova by Panic? I really like it and the built in remote server configuration: https://help.nova.app/remote-files/publishing/