(I kind of stole the idea from @javaarchive, but I improved on it a little bit.)
Wordpress on Glitch
Yes, it is WordPress on Glitch!
What is it built on?
How do I set up the project?
- Remix the project here.
- Visit the app, if it says “Error establishing a database connection”, skip to step 4.
- If it does not say “Error establishing a database connection”, type and paste the following commands.
mysql -u root DROP DATABASE wp; DROP USER 'wp'@'localhost';EXIT;
What is that command?
Let’s break at down:
mysql -u root logs into to mysql as the root user
DROP DATABASE wp; drops the
DROP USER 'wp'@'localhost'; drops the
EXIT; exits the mysql session
- Open the terminal, and launch mySQL using
mysql -u root
- Type in the following command:
CREATE USER 'wp'@'localhost' IDENTIFIED BY 'wp';CREATE DATABASE wp; GRANT ALL PRIVILEGES ON wp. * TO 'wp'@'localhost';FLUSH PRIVILEGES; EXIT;
What is that command?
Here, let’s break it down.
CREATE USER 'wp'@'localhost' IDENTIFIED BY 'wp'; Creates a user with the username “wp” and the password “wp”
CREATE DATABASE wp; Creates a dataabse with the name “wp”
GRANT ALL PRIVILEGES ON wp. * TO 'wp'@'localhost'; Gives the user “wp” Read/Write access to the database “wp”
FLUSH PRIVILEGES; Reloads the table to make sure the user “wp” can use the database.
EXIT; Exits the MySQL Monitor.
- Run the command
chmod 777 /app/to make sure wordpress can set thing up correctly.
- Choose a language. Then click “Next”. When It ask you for database details, Enter this infomation:
Database Name: wp Username: wp Password: wp Database Host: localhost
Click next, then finish the on-screen prompts.
- Never go into the editor again after if you don’t have a Higher-end PC. It could crash your browser
- You should only click the “Next” button(s) once. Do not click it more than one time.
- Private your project after setting it up so no database info is leaked.
- WordPress’s CSS hates HTTPS, so, try to serve WordPress over HTTP.
- Oh oh! All of my blog post are gone! If you remixed the project after the 3rd of September (3:54 PM Eastern), Do this:
- Login into mySQL (
mysql -u root)
- Run this command:
DROP DB wp; SOURCE /tmp/backup.sql; GRANT ALL PRIVILEGES ON wp. * TO 'wp'@'localhost'; FLUSH PRIVILEGES; EXIT;
- Moving your blog away from Glitch? We will be sad to see you go, but run
refreshto get a new backup. Then grab your backup from