Fed up with the high-cost and difficult implementation of the current crop of CMS stacks for RapidWeaver? I was. So I made my own!
Using WordPress as the back end and some includes, I was able to get just what I want – and it was easy!
Here are the steps:
- Install WordPress →
- wp-config to get DB credentials →
- wp_posts is the table that has the data (view in phpMyAdmin or equivalent) →
- paste an include to your script (Perl, PHP etc) in RapidWeaver where you want the editable text →
- give client the WordPress login/pass and page URLs they can edit.
Example includes:
.shtml
<!--#include virtual="/cgi-bin/example.pl" -->
.php
<?php require '../includes/example.php' ; ?>
Benefits of this approach:
- Free!
- No licenses
- No subscriptions
- Use on as many sites as you want!
You don’t actually even need a DB to see how this approach works, just a text file. For example, FTP (or use cPanel) a text file to your server and then edit it online using Brackets or some other IDE.
<?php include 'includes/example.php' ; ?>
However, using WordPress for the back end offers many more options, especially for clients:
- Version control (if they make a mistake, they can go back to a previous revision)
- Easy to use editor
- No FTP
Optional WordPress Plugins and Settings
<meta name="robots" content="noindex">
- Always Edit In HTML – To help preserve your HTML formatting
- Disable Comments
- Disable XML-RPC
PHP Script
<?php
$mysqli = new mysqli("localhost", "username", "password", "database");
/* check connection */
if (mysqli_connect_errno()) {
printf(“Connect failed: %s\n”, mysqli_connect_error());
exit();
}
/* Change wp_posts and ID to match your DB */
$query = “SELECT * FROM wp_posts WHERE ID=5 “;
if ($result = $mysqli->query($query)) {
while ($row = $result->fetch_row()) {
printf($row[4]);
}
/* free result set */
$result->close();
}
/* close connection */
$mysqli->close();
?>
Screenshots
RapidWeaver – sample HTML in a page
Copy HTML to your WordPress page
Replace HTML in RapidWeaver with includes code
https://forums.realmacsoftware.com/t/free-cms-for-rapidweaver/14718