This CMS uses WordPress as the back end (though you can just as easily go direct to MySQL or some other CMS)
- Install WordPress →
- wp-config.php 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.
.shtml
<!–#include virtual=“/cgi-bin/example.pl” –>
.php
<?php require ‘…/includes/example.php’ ; ?>
Benefits
- No licenses
- No subscriptions
- Use on as many sites as you want!
<?php require ‘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
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