I switched back to the vintage theme as the 2024 Lamb theme I'm working on has some display issues on mobile. #lamb
Sander van Dragt's Notes
-
-
Setup TextPattern using PHP composer and DDEV
I was totally going to step-by-step this guide but then I lost my draft.
TextPattern (TXP) instructs you to extract a zip file into your webroot and on upgrade replace all the files. If you have used PHP Composer to install your PHP dependencies you know this can be done more smoothly.
Composer PHP dependencies
If you want to the quick way, I've created a
composer.jsonto get you started: view gist.It adds the GitHub repository as a composer dependency, and installs it into the
site/directory usingoomphinc/composer-installers-extender. The repo's type is set as a project type, so there are a couple of lines needed to setup composer installer to match it.Run
composer update, you will now have a site and vendor directory, in addition to the composer files:โโโ composer.json โโโ composer.lock โโโ site โโโ vendorMissing JavaScript Depependencies
This typically should have been enough but in the TextPattern GitHub project the
package.jsonfile that contains the JavaScript dependencies is both ignored by git (so is missing from our checkout) but requires dependencies the install needs to run.Let's pull in the copy from the
mainbranch and install the dependencies using npm:$ cd site $ wget https://raw.githubusercontent.com/textpattern/textpattern/main/package.json $ npm install --omit=dev $ cd ..Local environment
For a local environment, I recommend DDEV. To set this up, simplify specify a project name and the docroot where the TXP install is installed to:
$ ddev config --docroot=site --project-name=mysite $ ddev start $ ddev launchThe #TextPattern Setup wizard should now open. Use
ddev describeto inform you of the database values to enter in the setup wizard.edit: For some reason I'm getting a database unavailable message. I'll update this if I find a solution. edit2: Solved I think, either through a reboot or the npm instructions.
-
If you're looking for a script to get the top errors form a PHP error_log, then I published that: https://github.com/svandragt/top-php-errorlog #projects