Code Monkey home page Code Monkey logo

learn-wordpress's Introduction

This repo contains wordpress v5.4.2 source and it's for learning purpose.

NOTE: These are Zemian's note. There is a readme.html from the original WordPress source that's not related to this readme.

Installation

See Installation Guide

1. Setup DB on MacOSX

brew install services mysql
brew services start mysql

mysql -u root
CREATE USER 'zemian'@'localhost' IDENTIFIED WITH mysql_native_password BY 'test123';
CREATE DATABASE wordpress CHARACTER SET utf8 COLLATE utf8_general_ci;
GRANT ALL PRIVILEGES ON wordpress.* TO 'zemian'@'localhost';
FLUSH PRIVILEGES;

NPTE: If you are using PHP 7.4 with mysqli, then you need to use mysql_native_password. See https://stackoverflow.com/questions/50026939/php-mysqli-connect-authentication-method-unknown-to-the-client-caching-sha2-pa

Tips: Convert existing DB to use utf8

ALTER DATABASE wordpress CHARACTER SET utf8 COLLATE utf8_general_ci;

2. Setup wp-config.php

3a. Setup php

The /usr/bin/php that comes with MacOX does not include php-cgi ?

We can try to install latest version with brew install php

Alternative option: Installing php by building from source

  1. Download source php-7.4.9.tar.gz
  2. Run brew install libiconv
  3. Run ./configure --prefix=/usr/local --with-iconv=/usr/local/opt/libiconv --enable-sockets --with-mysqli=mysqlnd
  4. Run make
  5. Run sudo make install

NOTE: PHP 7 uses option --with-mysqli instead of --with-mysql. The mysqlnd is a PHP native driver.

3. Setup a web server

  1. Run brew install lighttpd
  2. Run lighttpd -D -f lighttpd/lighttpd.conf
  3. Open http://localhost:3000/

4. Run wordpress install script

http://localhost:3000/wp-admin/install.php

learn-wordpress's People

Watchers

 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.