Skip to content

Instantly share code, notes, and snippets.

@tecoholic
Created August 5, 2011 02:43
Show Gist options
  • Save tecoholic/1126827 to your computer and use it in GitHub Desktop.
Save tecoholic/1126827 to your computer and use it in GitHub Desktop.
Setting up Wordpress locally for development in Ubuntu
# Download WordPress
cd /tmp
wget http://wordpress.org/latest.tar.gz
# Extract your WordPress archieve into your server directory
tar zxvf latest.tar.gz
mv wordpress/ /var/www
# Create MySQL Database for WordPress
mysql -u root -p
#Enter password:
# Enter the following in mysql> Prompt
CREATE DATABASE wordpress;
CREATE USER wordpress;
SET PASSWORD FOR wordpress = PASSWORD(“wordpresspassword”);
GRANT ALL PRIVILEGES ON wordpress.* TO “wordpress”@”localhost” IDENTIFIED BY “wordpresspassword”;
flush privileges;
EXIT
# Configure WordPress Setting
cd /var/www/wordpress/
cp wp-config-sample.php wp-config.php
vim wp-config.php
# Install WordPress
# the folder (/var/www/wordpress) and all its files and subfolders must be owned by www-data
chown -R www-data /var/www/wordpress
# Open the browser to “http://localhost/wordpress” to install it
<?php
/** Find the following lines in wp-config.php */
/** The name of the database for WordPress */
define('DB_NAME', 'wordpress');
/** MySQL database username */
define('DB_USER', 'wordpress');
/** MySQL database password */
define('DB_PASSWORD', 'wordpresspassword');
/** MySQL hostname */
define('DB_HOST', 'localhost');
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment