Windows7部署WordPress傻瓜式教程(IIS7.5+MySQL+PHP+WordPress)
打算在本地装个 WordPress 玩玩,可以前没有接触过 PHP 和 MySQL 。
在网上淘啊淘,教程一大堆,但却没有一个能让人完全信赖的,走了不少弯路,不过最后终于弄出来了。
为了让大家少走弯路,觉得有必要把这个过程记录下来。
第一次写教程,面向零部署经验的朋友,洋洋撒撒这么多,有点罗嗦了,请海涵,内容如有不正确的,请拍砖。
由于图片比较多,网页打开可能需要一些时间,请耐心等待。
我把该教程做成了一个PDF,网速慢的朋友可以在这里下载 http://files.cnblogs.com/vengen/WordPressInstall.zip
目录:
1、Windows7安装IIS7.5;
2、安装MySQL及配置;
3、安装PHP;
4、部署WordPress;
5、WordPress站点备份及迁移(2009-1-2修改)。
相关程序:
mysql-essential-5.0.67-win32.msi (part1)
mysql-essential-5.0.67-win32.msi (part2)
php-5.2.12-Win32.zip
wordpress-2.9-zh_CN.zip
1、Windows7安装IIS7.5
a、打开“控制面版”;
b、找到“程序和功能”,打开;
c、打开“打开或关闭Windows功能”,为了避免麻烦,建议全部勾选“Internet 信息服务”和“Internet Information Services 可承载的Web核心”;
d、“确定”保存,IIS安装完成。
2、安装MySQL及配置
我用的MySQL是(mysql-essential-5.0.67-win32.msi)
注意:接下来我全部会安装在 D:\Server_Core 路径下,文中会有很多地方使用到该路径。大家可以根据自己的需要设定,但是配置时要注意替换。
a、安装MySQL,设置如同图所示:
b、配置MySQL
进行测试:
MySQL配置完成。
3、安装PHP
我用的PHP是(php-5.2.12-Win32.zip)
a、直接解压到 D:\Server_Core\PHP 路径下
b、用文本编辑器打开 php.ini-recommended,将文件名改为 php.ini 并做如下修改:
c、打开IIS7.5;
d、打开“处理程序映射”;
e、打开“添加模块映射”,进行如下设置;
f、“确定”完成PHP安装及IIS7.5配置,重启 IIS 。
g、测试 IIS7.5 + MySQL + PHP 是否安装成功
新建 info.php ,内容为 ,如图:
将这个文件放在 IIS 默认站点下,看是否能正常显示:
如果得到以上显示,说明你部署成功了,恭喜!(不过一般情况下按照前面的步骤一步步走下去应该是不会失败的)
4、部署WordPress
a、解压 wordpress-2.9-zh_CN.zip 至 D:\Server_Core\wordpress ;
b、创建WordPress数据库
打开 cmd 控制台,输入:mysql -u root -p 输入密码
查看现有的数据库,输入:show databases;
创建WordPress数据库wordpress_db,输入: create database wordpress_db;
创建完成,操作过程如下图:
c、用文本编辑器打开 wp-config-sample.php,将文件名改为 wp-config.php 并做如下修改:
其中最后一处修改可以访问 https://api.wordpress.org/secret-key/1.1/ 获取
d、添加 WordPress 站点
打开 ISS7.5,“添加网站”;
e、配置站点:
打开 http://localhost/wp-admin/install.php 输入博客标题和您的电子邮件
安装 WordPress
就到此位置,剩下的自己去探索吧!
5、WordPress 站点备份及迁移
最后再讲一下WordPress站点如何备份和迁移吧,
1、IIS站点备份很容易,只要直接备份 D:\Server_Core\wordpress 文件夹即可。
2、备份和还原 wordpress_db 数据库也是同样道理,也是直接操作 D:\Server_Core\MySQL\data\wordpress_db 文件夹,只是在操作前要停止 MySQL 服务。
进入控制面板,打开“服务”
找到 MySQL
停止此服务
打开 MySQL 数据库存放目录 D:\Server_Core\MySQL\data
对文件夹 wordpress_db 直接进行备份还原操作即可。
一切就这么简单!
Vengen
2009-1-1 发表
2009-1-2 修改

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics











In MySQL, the function of foreign keys is to establish the relationship between tables and ensure the consistency and integrity of the data. Foreign keys maintain the effectiveness of data through reference integrity checks and cascading operations. Pay attention to performance optimization and avoid common errors when using them.

The main difference between MySQL and MariaDB is performance, functionality and license: 1. MySQL is developed by Oracle, and MariaDB is its fork. 2. MariaDB may perform better in high load environments. 3.MariaDB provides more storage engines and functions. 4.MySQL adopts a dual license, and MariaDB is completely open source. The existing infrastructure, performance requirements, functional requirements and license costs should be taken into account when choosing.

SQL is a standard language for managing relational databases, while MySQL is a database management system that uses SQL. SQL defines ways to interact with a database, including CRUD operations, while MySQL implements the SQL standard and provides additional features such as stored procedures and triggers.

The future of C will focus on parallel computing, security, modularization and AI/machine learning: 1) Parallel computing will be enhanced through features such as coroutines; 2) Security will be improved through stricter type checking and memory management mechanisms; 3) Modulation will simplify code organization and compilation; 4) AI and machine learning will prompt C to adapt to new needs, such as numerical computing and GPU programming support.

C isnotdying;it'sevolving.1)C remainsrelevantduetoitsversatilityandefficiencyinperformance-criticalapplications.2)Thelanguageiscontinuouslyupdated,withC 20introducingfeatureslikemodulesandcoroutinestoimproveusabilityandperformance.3)Despitechallen

Multiple calls to session_start() will result in warning messages and possible data overwrites. 1) PHP will issue a warning, prompting that the session has been started. 2) It may cause unexpected overwriting of session data. 3) Use session_status() to check the session status to avoid repeated calls.

AI can help optimize the use of Composer. Specific methods include: 1. Dependency management optimization: AI analyzes dependencies, recommends the best version combination, and reduces conflicts. 2. Automated code generation: AI generates composer.json files that conform to best practices. 3. Improve code quality: AI detects potential problems, provides optimization suggestions, and improves code quality. These methods are implemented through machine learning and natural language processing technologies to help developers improve efficiency and code quality.

MySQL and phpMyAdmin can be effectively managed through the following steps: 1. Create and delete database: Just click in phpMyAdmin to complete. 2. Manage tables: You can create tables, modify structures, and add indexes. 3. Data operation: Supports inserting, updating, deleting data and executing SQL queries. 4. Import and export data: Supports SQL, CSV, XML and other formats. 5. Optimization and monitoring: Use the OPTIMIZETABLE command to optimize tables and use query analyzers and monitoring tools to solve performance problems.
