Wordpress and localhost

From Wiki @ Karl Jones dot com
Jump to: navigation, search

You can run WordPress on your personal computer or laptop using localhost.

Screenshots from lecture:


Discussion

None of the files in the WordPress folder have any meaning to a web browser. Most of the WordPress files are PHP files, which cannot be browsed directly.

WordPress requires a web server to function. You can then browse the web server, to see the "served up" web pages.

LAMP

Install a LAMP (software bundle) on your computer:

All LAMP bundles do essentially the same thing. Popular bundles include:

localhost

When you have your LAMP bundle installed, start the program and browse to your localhost home page:

Depending on your LAMP bundle, you may need to use a port number in the URL:


htdocs

The web pages for your localhost site are stored in the htdocs folder, inside the application folder for your specific LAMP bundle.

Put all of your web pages and subfolders in here.

When you first use a LAMP bundle, the htdocs folder will contain some default files and subfolders.

For example, MAMP creates a subfolder named MAMP, which contains the pages for the MAMP administrative control panel.

LAMP bundles typically provide admin control panels for a variety of tasks.

phpMyAdmin

phpMyAdmin is a browser-based tool for managing MySQL databases.

Creating a WordPress database

When installing WordPress, create a new database using phpMyAdmin.

Every database on your computer must have a unique name.

The WordPress database is typically named wordpress, but you can use any name for the database, so long as you use that same name when you configure WordPress.

Database user and password

To use a database, you need a database user, and a password for that user.

LAMP bundles typically use root for both username and password.

See also