You can open the Marketplace tab and search for the current LAMP stack.
We will use the LAMP stack on a Basic plan for 5$/month.
php -v
# if php 8 thenYou can open the Marketplace tab and search for the current LAMP stack.
We will use the LAMP stack on a Basic plan for 5$/month.
php -v
# if php 8 then| #!/usr/bin/env node | |
| import { readdir, readFile, stat, writeFile } from 'node:fs/promises'; | |
| import path from 'node:path'; | |
| const rootDir = path.resolve(process.argv[2] ?? process.cwd()); | |
| const skipDirs = new Set(['.git', 'node_modules']); | |
| const sourceMapLine = /^[ \t]*\/\/# sourceMappingURL=data:app[^\r\n]*(?:\r?\n)?/gm; | |
| let filesChecked = 0; |
| # Print status for all fail2ban jails. | |
| function f2bstall() { | |
| JAILS=($(fail2ban-client status | grep "Jail list" | sed -E 's/^[^:]+:[ \t]+//' | sed 's/,//g')) | |
| for JAIL in ${JAILS[@]} | |
| do | |
| echo "--------------- 👀 JAIL STATUS: $JAIL ... ---------------" | |
| fail2ban-client status $JAIL | |
| echo "--------------- ... ---------------" | |
| done | |
| } |
Using the REST API to upload a file to WordPress is
quite simple. All you need is to send the file in a
POST-Request to the wp/v2/media route.
There are two ways of sending a file. The first method simply sends the file in the body of the request. The following PHP script shows the basic principle:
Consider supporting my work by purchasing the course this tutorial is a part of i.e. VSCode Power User →
Local by FlyWheel WordPress install is a custom install<core_identity> You are an assistant called Cluely, developed and created by Cluely, whose sole purpose is to analyze and solve problems asked by the user or shown on the screen. Your responses must be specific, accurate, and actionable. </core_identity>
<general_guidelines>
| function pn_get_attachment_id_from_url( $attachment_url = '' ) { | |
| global $wpdb; | |
| $attachment_id = false; | |
| // If there is no url, return. | |
| if ( '' == $attachment_url ) | |
| return; | |
| // Get the upload directory paths |
| /* ---------------------------------------------------------------------------- | |
| * DEBUG CSS for XDEBUG | |
| * ------------------------------------------------------------------------- */ | |
| pre.xdebug-var-dump { | |
| display: table; | |
| width: 100%; | |
| padding: 5rem; | |
| margin: 5rem; | |
| font: 2.5rem/2.5 'Operator Mono'; | |
| } |
| import { render } from '@react-email/render'; | |
| import fs from 'fs'; | |
| import path from 'path'; | |
| import React from 'react'; | |
| // Get a list of all files in the 'emails' directory | |
| const emailFiles = fs.readdirSync('./emails'); | |
| // Create a new directory named 'build' if it doesn't exist | |
| if (!fs.existsSync('build')) fs.mkdirSync('build'); |
| Twitter ID, Screen name, Followers | |
| 12,jack,6526006 | |
| 13,biz,2608289 | |
| 20,ev,1679155 | |
| 57,SarahM,17448 | |
| 59,Tim535353,9340 | |
| 76,marciadorsey,19501 | |
| 224,davepell,57523 | |
| 291,goldman,916937 |