AWS provides a 750 hours free tier on Windows machine. I am always wondering how to install wordpress on it to use this free tier instance . Here is all steps I followed today. Most steps are same as WPMU DEV’s post “Setting Up WordPress Locally for PC/Windows with WampServer“. I do add some of my own experience in the steps.

Basically WampServer = (Apache, PHP, MySQL on Windows). WAMP is the software suite installed on popular Windows operate system, includes Apache, MySQL, PHP and some other tools. It is derived from LAMP which stands for Linux, Apache, MySQL, and PHP. As the name implies, while LAMP is used on Linux servers, WAMP is used on Windows servers.

Note: Microsoft WebPI is another popular way to install wordpress on Windows server. But truly not recommend. I managed to get it working and eventually still find WAMP is better and easier to use.

1. Install AWS Windows Instance

My previous post Launch and Access Amazon AWS EC2 Instances has detailed steps how to launch one. This time , I choose Microsoft Windows Server 2012 R2 Base. I have tried 2016 Base, but since it is only has 1G Ram and 1 virtual core, 2012 is better option. Also keep it in mind , it is 64bit version. Later if you need to install any software, it is best to get 64bit version to do installation. Follow screen, make sure choose right Network (VPC), right Subnet (Availability Zone) and enable auto-assign public ip. I always assign a static private ip for my instance. It is much convenient to do configuration later cross multiple instances.

2. RDP into your windows instance

RDP process is standard. After you decrypted your administrator password, you can RDP to it as long as your security group opened the port. I always create another user and put it into administrators group for future access. In this way, I do not have to decrypt my administrator password each time when I need to access windows machine.

3.  Download and install WampServer

http://www.wampserver.com/en/ provides you download link. Make sure you are choosing WAMPServer 64 Bits (X64) version. It is 431M file. But download it from AWS instance is just one minute thing.

There is one thing you have to be very careful. Before start installation, you will need to install all suggested VC redistributable packages includes vc9, vc10, vc11, vc13 and vc 14.. All download links have been provided in the Setup Information page. You will have to install those VC redistributable packages to start some services later.

4. Launch Localhost site
After installed WAMPServer, you should be able to see a green icon on your windows task bar notification area. open http://localhost page from your IE browser. It automatically load c:/wamp64/www/index.php file.

5. Install WordPress
Download latest wordpress from https://wordpress.org.  Since I like wordpress be my homepage. I copied all extracted files into c:/wamp64/www folder, which is default Web Site folder created by installation of WAMPServer.

5.1 Create wordpress DB 
Launch PhpMyAdmin from http://localhost/phpmyadmin or from WAMPServer green icon.

By default, you can use root user to log in phpMyAdmin without password. Create a new database wordpress for your next step to install WordPress.

Command line to create a MySql Database:

[email protected]:~$ ping mysql2.c33rmuszoxid.us-west-2.rds.amazonaws.com
PING mysql2.c33rmuszoxid.us-west-2.rds.amazonaws.com (10.10.0.117) 56(84) bytes of data.
^C
--- mysql2.c33rmuszoxid.us-west-2.rds.amazonaws.com ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 1006ms[email protected]:~$ sudo mysql -h 10.10.0.117 -u johnyan -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 16
Server version: 5.6.35-log MySQL Community Server (GPL)Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql>
mysql> create database wordpress;
Query OK, 1 row affected (0.00 sec)mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| innodb             |
| mysql              |
| performance_schema |
| sys                |
| wordpress          |
| wp                 |
+--------------------+
7 rows in set (0.00 sec)mysql> use wordpress;
Database changed

5.2 Configure WordPress to connect MySql Database

use wordpad or notepad to open wp-config.php file under the folder c:/wamp64/www. change DB_Name, DB_User and DB_Password to the one as show below.

// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'wordpress');/** MySQL database username */
define('DB_USER', 'root');/** MySQL database password */
define('DB_PASSWORD', '');
/** MySQL hostname */
define('DB_HOST', 'localhost');

There is no change on DB_HOST name since wordpress will only need to connect to local MySql. If you are using remote MySQL, that will be your remote DB server’s ip address or DNS name.

Use your IE browser to open http://localhost page again. You will get wordpress welcome page :

Enter site title and username / password which will be used to manage your wordpress site. Then you can click Install WordPress button to finish the whole wordpress installation process.

6. Publish Your Own Site to Internet
Now you have installed WordPress site and it is working fine at http://localhsot this link. How about your own domain such as my netsec.51sec.org. How to get it working with your own domain?

6.1 Get your instance public ip and registered with your domain provider.
From AWS console, you should be able to get an automatically assigned public ip address. This public ip will change each time when you stop or reboot your windows instance. There is no problem if you just use it temporary. Or if you intend to keep it same all the time,  you can get a fixed Elastic IP for free. In my test environment, 34.214.8.80 is one I got as temporary one.

My domain provider is GoDaddy. Under doamin 51sec.org, I added one A record netsec which value is 34.214.8.80. In this way, all request to netsec.51sec.org will be translated to public ip 34.214.8.80, which is my AWS windows instance.

6.2 Open your firewalls. 
There are two firewalls. One is security group on AWS EC2 console. You will need to allow http (tcp 80) opened for 0.0.0.0/0.
Second is local windows firewall which is inside your windows server.

6.3 WAMP Configuration Change for Public Access

Open httpd-vhosts.conf by left one click WAMPServer green icon:

Change ServerName and Server Alias from localhost to netsec.51sec.org.
Also change Require to all granted

# Virtual Hosts
#
<VirtualHost *:80>
  ServerName netsec.51sec.orgServerAlias netsec.51sec.orgDocumentRoot "${INSTALL_DIR}/www"<Directory "${INSTALL_DIR}/www/">Options +Indexes +Includes +FollowSymLinks +MultiViewsAllowOverride All
    Require all granted</Directory>
</VirtualHost>

6.4. Restart All Services from WAMPServer green icon. 
6.5. Change WordPress SiteURL and home Configuration
Since your wordpress was configured to use localhost, the siteurl and home configuration is set to http://localhost. They will need to change to http://netsec.51sec.org.
7. Make WAMP services Start Automatically

7.1 Log in as an administrator.
7.2 Start -> Run “services.msc”
7.3 Right click the service wampapache (may also be called wampapache64). Go to properties and set start-up type to ‘Automatic’
If you want MySQL to also be available on startup, then repeat step 3 for  wampmysqld  (or  wampmysqld64)

That is it. Now you should be able to get a published WordPress site with your own domain name. AWS free tier windows 2012 R2 base server is enough to host a wordpress site with a couple of thousand visitors per day.  
References:
  • Setting Up WordPress Locally for PC/Windows with WampServer

Share this:

  • Click to share on Twitter (Opens in new window)
  • Click to share on Facebook (Opens in new window)
  • More
  • Click to print (Opens in new window)
  • Click to share on LinkedIn (Opens in new window)
  • Click to share on Reddit (Opens in new window)
  • Click to share on Tumblr (Opens in new window)
  • Click to share on Pinterest (Opens in new window)
  • Click to share on Pocket (Opens in new window)
  • Click to share on Telegram (Opens in new window)
  • Click to share on WhatsApp (Opens in new window)
  • Click to share on Skype (Opens in new window)

Like this:

Like Loading...

Related

WAMP and WordPress Install on AWS Free Tier Windows 2012 R2相关推荐

  1. MSB8036 The Windows SDK version 10.0 was not found. Install the required version of Windows SDK o

    MSB8036    The Windows SDK version 10.0 was not found. Install the required version of Windows SDK o ...

  2. 戴尔服务器r530 windows server 2012 r2 安装无法找到install.wim 错误代码0x80070026,以及制作U启动盘决解ISO文件超过5G大小限制的解决方案

    戴尔服务器r530 windows server 2012 r2 安装无法找到install.wim 错误代码0x80070026,以及制作U启动盘决解ISO文件超过5G大小限制的解决方案 关于在戴尔 ...

  3. win2012 r2 php mysql,在Windows Server2012 R2上安装WordPress PHP和MYSQL

    微软WEB平台安装程序(Web Platform Installer)让平台的部署和以前相比轻松了许多,在没有平台安装程序之前,平台的部署是相当繁琐的,即便是相当有水平的人也会感觉这是一件比较棘手的事 ...

  4. wordpress install.php 500,安装WordPress出现500错误的解决办法 | Wopus

    最近遇到了一个问题,新的主机,安装最新版的WordPress程序,在填写完数据库信息之后,没问题,填写完网站名称,用户名,密码,点击提交之后,就出现500错误,错误提示如图: 这个问题引起的原因是:W ...

  5. windows下python如何安装模块或包? How to install package or module in windows OS when using PYTHON?

    摘要:本文介绍了在windows下利用cmd安装第三方模块或包的方法. 更新20170531:作为小白,发现使用setup.py安装并不是万能的,找到了使用pip安装的方法,步骤为配置好环境变量后(参 ...

  6. 亚马逊(AWS) 创建EC2 - Windows

    最近接触了AWS服务器,使用EC2 安装Windows 系统和相关配置 之前都是使用国内云服务器,刚接触到 aws 感觉没有太大区别,可是使用过后和国内相比大不相同,因此踩了好多个坑 ! 通过这次使用 ...

  7. npm install -g n 报错 Windows

    今天晚上想更新Node,我之前的是v8.9.1现在官网已经更新到v11.6.0,我也更新一波: 1. 第一步 npm -g install n 2. 第二步 n stable (更新至最新稳定版本) ...

  8. install ssh by Cygwin about windows

    这里写链接内容 Administrator@ALiYunPC ~ $ ssh-host-config * Info: Generating missing SSH host keys * Query: ...

  9. 安装VMware ESXi 6 RC版

    体验vSphere 6之1-安装VMware ESXi 6 RC版 在2015年,各个公司都会发布一系列新的产品,例如Microsoft会发布Windows 10,VMware会发布vSphere 6 ...

最新文章

  1. It's Time to Say Goodbye (此刻告别)
  2. 奇葩问题解决-----解决异常情况下的黑屏
  3. html5+调用safari,Safari浏览器不酷,HTML5无效元素; JavaScript是
  4. chrome console 调试xpath
  5. LeetCode 698. 划分为k个相等的子集(回溯)
  6. python中赋值语句_python中赋值语句和增强赋值语句的区别
  7. rabbitmq 持久化_RabbitMQ原理与相关操作(三)消息持久化
  8. lamp配置python_LAMP搭建笔记
  9. 2016年《大数据》杂志调查问卷
  10. Oracle 12C R2-新特性-SQLPLUS提供查看历史命令的功能
  11. 文件夹复制删除 C#
  12. oracle mysql数据库管理工具下载_Oracle数据库管理工具PC版-Oracle数据库管理工具下载v15.0.21.0(32/64)-IE浏览器中文网站...
  13. 尚硅谷 硅谷新闻_硅谷如何将真正的创新变成一种夸大的幻想
  14. tomcat插入oracle中文乱码_Java连接数据库oracle中文乱码解决方案
  15. 百度推广关键字质量度优化指南
  16. ecshop 添加php标签,ECSHOP模板标签【ecshop标签大全】ecshop标签手册
  17. Java连接打印机打印二维码
  18. 微信开发者工具的下载及小程序项目创建
  19. html组态插件_组态 web组态 插件 编辑器 使用说明书
  20. 出现“连接到服务器失败。错误: 0x80080005”错误的解决办法

热门文章

  1. 软件开发应届生求职经验(其他专业可参考)
  2. iOS系统中判断设备类型
  3. linux下ffmpeg安装实现音频拼接
  4. STM32CubeMX基于HAL库点亮LED灯
  5. 卡尔曼滤波原理和Matlab以及python代码实现
  6. MATLAB命令与函数集合
  7. win11打开VMware pro虚拟机蓝屏
  8. 【数据可视化应用】绘制词云图(附Python代码)
  9. 【论文阅读】mmSampler: Efficient Frame Sampler for Multimodal Video Retrieval【MLSys 2022】
  10. Python——柱状图(条形图、堆叠图)