Coder Social home page Coder Social logo

wordpress-on-replit's Introduction

Run WordPress on Repl.it

Install WordPress and wp-cli on Repl.it using SQLite

How

  1. Create a new Repl.it as a PHP Web Server
  2. Update the replit.nix file to include the code in this repo
  3. Restart the Repl
  4. Run this command from the Replit shell: bash <(curl -s https://raw.githubusercontent.com/ethanpil/wordpress-on-replit/master/install-wordpress-on-replit.sh)

Caveats:

  • WordPress is running on a local SQLite file. Not performant. Great for testing and hacking.
  • WordPress is running on PHP's built in web server which doesn't support rewrites (fancy URLs)
  • Subject to all of the limitations of the SQLite plugin

Future

I would like to explore setting up a Router Script for the PHP web server to see if I can get rewrites working. Some initial research:

How It Works

Repl.it now allows users to configure a REPL via Nix. The newest Nix environments include packages for PHP with SQLite Support, as well as WP-Cli support. So everything you need is now available. (Unlike in the past when we really had to go deep in and mess with things in a nasty way).

All we have to do now is setup Repl to load in the correct Nix packages and install WordPress with the SQLite plugun. The replit.nix file in this Repo includes the necessary Nix packages and the Bash script install-wordpress-on-replit.sh simply automates the Wordpress install.

The script does the following:

  1. Check to make sure Nix has installed the packages needed for WP-Cli (less and wp).
  2. Download WordPress files through WP-Cli
  3. Download and install the SQLite plugin for WordPress
  4. Create a basic wp-config.php file with some tweaks for Replit and your Repl URL.
  5. Ask for your prefered credentials and install WP

Thanks & Credits

Nix Version:

Orignial Version:

wordpress-on-replit's People

Contributors

ethanpil avatar danydin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.