WordPress running environment
- PHP 5.2.4 or later ("php 6.0" released by a third party is not supported ")
- MySQL 5.0 or later
- Apache mod_rewrite module (optional, used to support "Fixed Link" and "site network)
What is wampserver?
Wampis the first line of windows?apache=mysqland PHP. static files (such as pure HTML with a suffix of .html) can be run on the operating system, but script files written in PHP are not allowed. The operating system does not understand what it is saying, so a translation is required, this translation is the PHP running environment Wamp, which is used to parse the PHP script. Wampserver is an open-source PHP suite built locally. After installing this suite, we simulate a PHP environment locally, so that we can install and use WordPress locally.
Download wampserver
The latest version of wampserver is 2.2d at present, but we should not go to the latest version, because the new versions of PHP and MySQL are relatively high, and the servers in reality cannot be upgraded so quickly, A higher MySQL version may even cause joomla, a famous CMS system, to be unable to be installed. Therefore, we recommend a safe version of wampserver 2.0g. Click here to download it.
Install wampserver
1. Double-click the installation program (wampserver2.0g-1.exe ). 2. Select the installation location. I have selected the D disk. 3. During the installation process, you need to select the default browser to open the website.
- Find the installation location of Firefox, right-click the Firefox icon, and the Properties dialog box is displayed. The target address is the location of the Firefox executable program.
- Click here to find firefox.exe and continue the installation.
3. continue the installation. Use the default settings for all subsequent settings. After the installation, select launch and run wampserver. The wampserver image is displayed in the lower right corner of the screen. If the installation fails, the icon is not all white, it may be yellow or red or white, indicating that the Apache or MySQL service is not started. Please follow the instructions below to exclude
- Close all communication programs that may occupy ports, such as thunder, Skype, or game clients, and restart wampserver.
- In "start"-"run", type services. MSC to bring up the local service settings and check whether the services wampapache and wampmysql are started properly. If not, open the service and check the reason for the failure.
4. after the language is installed, the English version is used by default. If you do not like it, you can right-click the wampserver icon and choose language> chinese5. this is an important step to configure wampserver. If the server is not configured properly, there are many problems when running WP.♦To enable the mod_rewrite module, wampserver does not enable this module by default. However, this is required for WordPress fixed connections, so now you can enable it to find httpd. CONF file. If you follow the steps above, the location is
1
|
D:/Wamp/bin/Apache/apache2.2.11/CONF/httpd. conf
|
Line 3 of the file, find
1
|
# Loadmodule rewrite_module modules/mod_rewrite.so
|
Remove the previous # and restart wampserver.♦Configure PHP. INI left-click the wampserver System icon and select php> PHP. INI, will use NotePad to open the following items, and modify their value post_max_size-to allow the maximum value of the data transmitted through post, change to the value that you think is appropriate, if the setting is too small, this will cause the upload of large images or videos to fail.
Upload_max_filesize-maximum value that can be uploaded. This value is usually smaller than post_max_size.
Max_execution_time-maximum time allowed for script execution. If this time is exceeded, a timeout error is reported. The default value is 30 seconds.
Max_input_time-How long does a script wait for input data?
Memory_limit-memory limit. When creating a thumbnail, it will consume a large amount of memory. If the memory is insufficient, the following error fatal error: allowed memory size of 134217728 bytes will be reported.
Exhausted (tried to allocate 1099 bytes) inerror_reporting = e_all &~ E_notice-the default value is e_all. It is recommended to change it to e_all &~ E_notice, that is, no notice error is displayed, and all others show error log settings. If you want to automatically create error_log in the directory where the error script is located, configure it as follows. If not, skip this item.
1 2
|
; Log errors to specified file. Error_log = error_log
|
So far, wampserver has been installed successfully. We can continue to install Wordpress.
The link starting with http: // can be considered as a file.
Fopen, include, getimagesize, and other functions support opening files starting with http: //, such
1
|
Getimagesize ('HTTP: // localhost/WordPress/WP-content/uploads/2010/07/myimage.jpg ');
|
To implement this function, you need to modify the two settings in PHP. ini to on
1 2 3 4 5
|
; Whether to allow the treatment of URLs (like http: // or FTP: //) as files. Allow_url_fopen = on
; Whether to allow include/require to open URLs (like http: // or FTP: //) as files. Allow_url_include = on
|
However, this is not the case. Opening the address starting with http: // With fopen may time out or report an error indicating that the file does not exist, another important step is to modify the host file. This is not a Wamp problem. It is a Windows problem. The host file is located (assuming that your system is located on disk C)
1
|
C: \ windows \ system32 \ drivers \ etc \ hosts
|
Open the file and find
1 2 3
|
# Localhost name resolution is handled within DNS itself. #127.0.0.1 localhost #: 1 localhost
|
Remove the marker before 127.0.0.1 to use the file starting with http.