Skip to main content

Step To Host Local Custom Wordpress Site (i.e from Xampp in My case) to AMAZON EC2 instance.

1. Create AWS account and create ec2 instance for same as follows:
-> select Linux AMI
->t2.micro
->security groups must be http,secure group and custom tcp (3306 for mysql)
->key generate(.pem file)
-> launch instances

2. on windows create .ppk file from pem using puttygen

3. login to your instance using putty
host - ec2-user@xxxxxxxxxxxxx
user - ec2-user
ssh(auth)-ppk file

connection ---> Success

4. after successful login perform these commands

>[ec2-user ~]$ sudo yum update -y
>sudo yum install -y httpd24 php70 mysql56-server php70-mysqlnd
>sudo service httpd start
>sudo chkconfig httpd on
>chkconfig --list httpd
>ls -l /var/www
sudo usermod -a -G apache ec2-user
>sudo chown -R ec2-user:apache /var/www
>echo "<?php phpinfo(); ?>" > /var/www/html/phpinfo.php
>http://my.public.dns.amazonaws.com/phpinfo.php
>sudo yum list installed httpd24 php70 mysql56-server php70-mysqlnd
>rm /var/www/html/phpinfo.php
>sudo service mysqld start
>sudo mysql_secure_installation
>sudo service mysqld stop
>sudo chkconfig mysqld on
>sudo yum install php70-mbstring.x86_64 php70-zip.x86_64 -y
>cd /var/www/html
>wget https://www.phpmyadmin.net/downloads/phpMyAdmin-latest-all-languages.tar.gz
>tar -xvzf phpMyAdmin-latest-all-languages.tar.gz
>http://my.public.dns.amazonaws.com/phpMyAdmin
>chkconfig --list httpd
>sudo yum remove -y httpd24 php70 mysql56-server php70-mysqlnd perl-DBD-MySQL56
>sudo yum install -y httpd24 php56 mysql55-server php56-mysqlnd
>sudo yum remove -y httpd24 php56 mysql55-server php56-mysqlnd perl-DBD-MySQL55
>from localhost go to settings->site settings -> change site and home url
>export db(sql.zip)
>login to phpmyadmin
>import sql.zip here
>from your project folder upload your code to git or bitbucket
>now move to var/www/html
>sudo git pull origin master
> edit wp-config.php with your favorite text editor
(sudo nano wp-config.php)
>set values for db,db_name,db_host,db_user
(db host should be ip for your instance)
--Site is Live on host ip--

Need any Help mail me - rupeshkumarthakur11@gmail.com
(Happy Coding)

Comments

Popular posts from this blog

Learn Nodejs

My favorite resource is "nodeschool.io!" "Install these choose-your-own-adventure style lessons and learn how to use node.js, npm and other related tools by writing code to solve realistic problems. The lessons run in your terminal and work on Windows, Mac and Linux."   Tutorials Hello World Hello World Web Server Node.js guide Build a blog with Node.js, express and mongodb Node.Js Tutorials At Project 70 Node.js for Beginners Learn Node.js Completely and with Confidence Videos Node tuts Introduction to Node.js with Ryan Dahl Node.js: Asynchronous Purity Leads to Faster Development Parallel Programming with Node.js Server-side JavaScript with Node, Connect & Express Node.js First Look Node.js with MongoDB Ryan Dahl's Google Tech Talk Screencasts Learn All The Nodes NodeTuts NodeCasts Books " The Node Beginner Book Mastering Node.js Up and Running with Node.js Node.js in Action Smashing Node.js: JavaScript Ev...
If you want lists, for back-end languages (in order of my ability to recall): If you want lists, for back-end languages (in order of my ability to recall): Java (and other JVM languages like Scala, Groovy, Clojure) PHP .NET (C#, VB) Ruby Python Perl Javascript (Node JS) Actionscript (Flash Media Server) CoffeeScript C (CGI) Erlang oh, and SQL for db queries For browser-based front-end languages, you're somewhat limited in what the browser can support (excluding launching out-of-browser applications). We could talk about: HTML Javascript CSS Actionscript CoffeeScript (compiled to Javascript) XML-based languages (X3D, SMIL, SVG, DITA, some interpreted by the browser, others transformed using XSL) VBScript Silverlight Java (applets) For native PC desktop front-ends, most popular front-end languages would probably be (I'm guessing, in no order): Visual Basic 6 (from my experience with big enterprises, I bet a lot of those are still out there, just like Windows Vista) .NET Jav...