This article describes how to build a local WordPress on your Ubuntu server. It is designed for beginners who want to work with WordPress and Ubuntu, and it is also convenient for local debugging. LAMP = Linux + Apache + Mysql + Perl/PHP/Python is a widely used platform. Examples include douban.com. WordPress is a blog platform developed using the PHP language, many plug-ins, easy to expand functions. Installation and use are very convenient. Currently, Wo
This article describes how to build a local WordPress on your Ubuntu server. It is designed for beginners who want to work with WordPress and Ubuntu, and it is also convenient for local debugging.
LAMP = Linux + Apache + Mysql + Perl/PHP/Python is a widely used platform. Examples include douban.com. WordPress is a blog platform developed using the PHP language, many plug-ins, easy to expand. Installation and use are very convenient. Currently, WordPress has become a mainstream Blog building platform.
Environment: 1. Install a Ubuntu computer. 2. access the internet.
1. Build a LAMP Platform
Here we recommend a good suite of XAMPP, which is easy to install and contains Apache releases for MySQL, PHP, and Perl. XAMPP has four versions: Linux, Windows, Mac OS X, Solaris, here I chose the for Linux version.
Easy to install
1. log on to Linux shell as a system administrator:
Su
2. Release the downloaded compressed file to/opt:
Tar xvfz xampp-linux-1.7.1.tar.gz-C/opt
3. This is the end. XAMPP is installed in the/opt/lampp directory. Run the following command to run XAMPP:
/Opt/lampp start
You should be able to see a message similar to the following on the screen:
Starting XAMPP 1.7.1...
LAMPP: Starting Apache...
LAMPP: Starting MySQL...
LAMPP started.
Okay. Apache and MySQL are running.
Finally, you need to use a small command to fix most of the security vulnerabilities. You only need to execute the following command:
/Opt/lampp security
It enables a small security check function to make the XAMPP installed more secure.
4. Configure XAMP, enter http: // 127.0.0.1/xampp/in the browser, click phpMyAdmin, and create a new database in MySQL localhost with the name: xxx
Ii. Wordpress
1. Go to the Wordpress | china (http://cn.wordpress.org/) site to download a Wordpress installation package
2. decompress the package and install it to the XAMP htdocs directory.
Tar xvzf wordpress-2.2.tar.gz
Cp-rf wordpress/opt/lampp/htdocs/
3. Open the wp-config-sample.php file in the/opt/lampp/htdocs/wordpress/directory and modify it.
Gedit/opt/lampp/htdocs/wordpress/wp-config-sample.php.
Mainly the first three
Define ('db _ name', 'xxx'); // The NAME of the database
Define ('db _ user', 'root'); // Your MySQL username
Define ('db _ password', 'Password ');//... And password
Save it as a wp-config.php.
Now, enter http: // 127.0.0.1/wordpress/wp-admin/install. php In the browser and follow the instructions in the WordPress installation script to complete the installation.
When installing Wordpress, it should be http: // 127.0.0.1/wordpress/wp-admin/install. php. If http: // localhost/wordpress/wp-admin/install. php installation. After the installation is complete, there is no problem with the IP address or domain name for local access, but the CSS may become invalid when it is mounted to the public network and accessed by an Internet machine.
Also, http: // 127.0.0.1 is the default Management Interface of XAMP, and we want to release it to the Wordpress homepage, open/opt/lampp/htdocs/index. php
Gedit/opt/lampp/htdocs/index. php
Change
Header ('location: '. $ uri.'/wordpress /');
You can.
Finally, it is very easy to hook your website to the Internet for others to access. In general Options> blog address (URL): enter your public ip address.
Remember to map port 80 behind the route or open DMZ. Then others can access your website through the Internet. XAMPP also supports SSL encryption, it can also be accessed through https, Isn't it cool.