Wordpress Installation

Anh-Thi Dinh
💡
💡 Update: Using Local! You can create very quickly a simple wordpress on localhost with a domain website.local. You can also backup your site and drag-n-drop into Local for using locally.
I create Math2ITwp theme for math2it.com from scratch. This note contains the basic things to create a theme like that.

Install Apache + MySQL + PHP.

Linux

Below are the short steps from this post.

Windows

  1. Download and install WampServer.
  1. By default, after installing, your site will be at C:\wamp64\www.
  1. Run WarmServer, an green icon on the right of taskbar will appear.

MacOS

  1. Install MAMP.
  1. Follow this post.

PHP executable (optional)

Just for running PHP + PHP IntelliSense on Visual Studio Code.
  1. Download PHP (Windows, portable).
  1. Put below lines in VSC setting file (change the path to yours).
    1. 1{
      2"php.validate.executablePath": "C:\\\\wamp64\\\\bin\\\\php\\\\php7.0.4\\\\php.exe",
      3"php.executablePath": "C:\\\\wamp64\\\\bin\\\\php\\\\php7.0.4\\\\php.exe"
      4}

Create local database + Wordpress

Create a database

  1. Open http://localhost/phpmyadmin/
  1. Create a new database testing_db (remember to choose utf8_general_ci before pressing Create)
  1. Create a new user thi with ALL PRIVILEGES (click on Check all).

Install Wordpress

  1. Download Wordpress.
  1. Create a folder thi in C:\wamp64\www (Windows), /var/www/html (Linux).
  1. Extract the content (wp-admin, wp-content,...) of the zip file downloaded in step 1 to /thi/.
  1. Go to http://localhost/thi and follow the instructions.
  1. Type the username and password you created (thi and thipassword).
  1. Press Install and wait.
  1. Login with username and password.
  1. All the configuration is at http://localhost/texmath/wp-admin/.

Clone a website to localhost

  1. Install Apache + MySQL + PHP.
  1. Create database + install Wordpress.
  1. At least, you have a workable site at http://localhost/thi/.
  1. Download and install an FTP app like WinSCP (Windows) or FileZilla or Transmit.
  1. Download the current theme on the remote to local. The theme is located at /wp-content/themes/.
  1. Clone database from remote site to local by using plugin All-in-One WP Migration. More detailed guid: English, Vietnamese. If your site's too big, exlude the media files and copy them later. They're all in wp-content/uploads.
  1. Note that, you have to use username and password given in the downloaded database instead of the one you created on localhost.
  1. Enable the downloaded theme in /wp-admin.