an easy to install, lightweight blog software written in PHP for people who are sad and like music
3056670e3e
Reviewed-on: https://git.donut.gq/emilyd/moodblog/pulls/15 |
||
---|---|---|
api | ||
css | ||
img | ||
templates | ||
write | ||
.gitignore | ||
creds.def.php | ||
index.php | ||
LICENSE | ||
README.md | ||
rss.php | ||
schema.sql |
Installation
- Install your preferred webserver, PHP, MariaDB/MySQL, and MySQLi.
- Start the MariaDB daemon.
- If you haven't yet, run
mysql_secure_installation
. - Run
mysql -u root -p
to log in to the SQL database. (If this fails, try running it as root.) - Enter the following commands. Remember to change the placeholders!
CREATE DATABASE moodblog;
GRANT ALL ON moodblog.* TO 'moodblog'@'localhost' IDENTIFIED BY 'password';
USE moodblog;
CREATE TABLE IF NOT EXISTS articles (
ID INT NOT NULL AUTO_INCREMENT primary key,
Time TIMESTAMP,
Title VARCHAR(512) NOT NULL,
Mood VARCHAR(256),
MoodImage VARCHAR(256),
Song VARCHAR(256),
Message MEDIUMTEXT NOT NULL
);
FLUSH PRIVILEGES;
EXIT;
- Tip: You can use /dev/urandom encoded with base64 to create long, strong passwords.
base64 /dev/urandom -w 512 | head -n 1
- Use git to clone this repository to any directory in your webroot.
- Example paths:
/var/www/html /var/www/blog /var/www/moodblog /var/www/html/moodblog /var/www/html/blog
- Copy templates/creds.def.php to templates/creds.php. Change the placeholders.
- Copy templates/config.def.php to templates/config.php. Change the placeholders.
- You really only need to change $url and $root to get a working installation, however, you really should change everything after $password.
- Sever your leg please. It's the greatest day.