Create a portfolio site QUICK! Host it free on AWS and get hired- The complete 2021 guide
Tags: aws, wordpress, resume, portfolio
Published: 2021-02-07 18:24:41

<!-- wp:paragraph -->
<p>Are you a developer?</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Don't have a resume website yet?</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Is money the main reason you haven't got one?</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>If you answered yes to the questions above, then this guide is for you and today those excuses are gone! I've done all the hard work for you, just follow this guide and start applying for developer jobs today!</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><em>If you just want to take a crack at cheaper self hosted options for your WordPress site then this guide is also for you.</em></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Hopefully this guide will be verbose enough to keep you on track and teach you a thing or two. Follow along! Every section is concluded with a video recap but to see those you'll have to look at the original post at https://drewlearns.com/move-your-wordpress-website-to-aws-from-another-host-for-free/</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<iframe width="1280" height="720" frameborder="0" scrolling="no" src="https://screencast-o-matic.com/player/crnjfkRSWe?ff=1&amp;title=0&amp;controls=1" allowfullscreen="true"></iframe>
<!-- /wp:html -->

<!-- wp:quote -->
<blockquote class="wp-block-quote"><p>I created this for myself out of frustration that I couldn't find a single document that accurately walked me from nothing to a working WordPress site on AWS with an SSL and without paying for an AMI on free tier AWS.<br>If you make it all the way through this guide and would like to know how to add an autoscaling group, place your setup on your own AMI, host your images on an S3, leverage CloudFront's CDN and much more - Let me know in the comments section!</p></blockquote>
<!-- /wp:quote -->

<!-- wp:heading -->
<h2>Table of contents:</h2>
<!-- /wp:heading -->

<!-- wp:list {"ordered":true} -->
<ol><li><a href="#0">Creating your resume website (Optional if you are just migrating a site)</a></li><li><a href="#1">Creating Your First EC2 Instance</a></li><li><a href="#2">PHP installation</a></li><li><a href="#3">Install MariaDB (MySQL) and Apache</a></li><li><a href="#4">Install a certificate with auto renewal</a></li><li><a href="#5">Secure your Database</a></li><li><a href="#6">Install WordPress</a></li><li><a href="#7">Set up FTP/SFTP for file transfer </a></li><li><a href="#9">Migrate your site from local to your AWS account </a></li></ol>
<!-- /wp:list -->

<!-- wp:separator -->
<hr class="wp-block-separator"/>
<!-- /wp:separator -->

<!-- wp:heading -->
<h2 id="1">Creating your resume website (Optional if you are just migrating a site)</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>If you'd like to create a site from scratch, this is a great place to start:</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>You can build a Resume using the Starter files you created from my <a href="https://drewlearns.com/how-to-make-a-portfolio-resume-in-wordpress-using-local/">video tutorial</a> or my <a href="https://drewlearns.com/how-to-make-a-portfolio-site-with-wordpress/">written tutorial</a>. All totally free of charge!</p>
<!-- /wp:paragraph -->

<!-- wp:quote -->
<blockquote class="wp-block-quote"><p>You can access the starter files from that tutorial here: <a href="https://share.drewlearns.com/4gujpBpl/">https://share.drewlearns.com/4gujpBpl/</a> (if that link doesn't work try <a href="https://drewlearns.com/portfolio-1/">this one</a>).</p></blockquote>
<!-- /wp:quote -->

<!-- wp:separator -->
<hr class="wp-block-separator"/>
<!-- /wp:separator -->

<!-- wp:heading -->
<h2 id="0">Creatinging Your First EC2 Instance</h2>
<!-- /wp:heading -->

<!-- wp:list {"ordered":true} -->
<ol><li> <p>Create Amazon account - it will charge you $1 but that charge will fall off.</p> </li><li> <p>Navigate to EC2 service</p> </li><li> <p>Select your AZ<br><img src="https://p289.p2.n0.cdn.getcloudapp.com/items/6quQ02GL/0cf99aa1-c1cd-4ff2-88f4-9fc00444afc8.jpg?v=640b98e7ca275be923e6e22ae5b891a0" alt="https://share.drewlearns.com/6quQ02GL"></p> </li><li> <p>Create a new instance<br><img src="https://p289.p2.n0.cdn.getcloudapp.com/items/ApuRNAdn/e30931de-ed77-4eac-8fb8-1c00b263f579.jpg?v=8eb200cb60b46d0e9cc15bac875fcff0" alt="https://share.drewlearns.com/ApuRNAdn"></p> </li><li> <p>Select the Amazon Linux 2 AMI (HVM), SSD Volume type.<br><img src="https://p289.p2.n0.cdn.getcloudapp.com/items/E0u9lzpZ/5df024fd-8d15-4100-9c86-b6df742b65cb.jpg?v=f95cc263c37aaffd485a13bd153206fc" alt="https://share.drewlearns.com/E0u9lzpZ"></p> </li><li> <p>Click "Review and Launch"</p> </li><li> <p>Click "Launch".</p> </li><li> <p>Click the first drop down and select "Create a new key pair" then name the keypair "wp-keypair".<br><img src="https://p289.p2.n0.cdn.getcloudapp.com/items/E0u9lnzE/b806c615-20b1-4751-853d-ace4083497da.jpg?v=5b889611257efaf57b672a2f9b8c885d" alt=""></p> </li><li> <p>A file will download called "wp-keypair.pem".</p> </li><li> <p>In terminal move that file to your root directory. <code>mv ~/Downloads/wp-key-pair.pem ~/ &amp;&amp; cd ~/</code></p> </li><li> <p>We have to add permissions to the file to use it so run <code>chmod 400 wp-key-pair.pem</code> then click "Launch Instance"</p> </li><li> <p>You should see your EC2 instance dashboard and an Instance ID with an Instance state saying "Pending" followed by "Running".</p> </li><li> <p>Click the Instance ID link in blue and an instance summary will appear. Select the "Security" tab <img src="https://p289.p2.n0.cdn.getcloudapp.com/items/04uJrqdl/540bfa92-31a0-4cd8-a4eb-b855a4801a4f.jpg?v=cf1520d1f4ff486e7697c2f8020289c0" alt="https://share.drewlearns.com/04uJrqdl">.</p> <blockquote><p>You can also find your public IP address in this screen. From that IP, you can point your domain to it, I'd strongly recommend doing that to take the full benefit of this guide. If you chose not to, you'll need to use your AWS public domain or IP address in the steps that follow instead of example.com.</p></blockquote> </li><li> <p>Add your IP for inbound SSH connections then save rules ( I skipped this step in the video recap at the bottom of this section but don't worry, we come back to it)<img src="https://p289.p2.n0.cdn.getcloudapp.com/items/jkueyQpQ/68758ec6-f29c-4a50-9ed6-b2f63b5c6a8c.jpg?v=1aacf9f416f8f22ed4da5f5464b03948" alt="https://share.drewlearns.com/jkueyQpQ"></p> </li><li> <p>Return to the EC2 dashboard and select the Instance you just edited. Click it's check box then Actions &gt; Connect.</p> </li><li> <p>Click the "SSH Client" tab. There is an example snippet, copy paste it into your terminal and press return. Type "yes" and press return again to acknowledge connecting. You are now SSH'd into your Instance.</p> </li></ol>
<!-- /wp:list -->

<!-- wp:image -->
<figure class="wp-block-image"><img src="https://p289.p2.n0.cdn.getcloudapp.com/items/4gu15JQm/8866cee1-8cc9-4749-bf7d-9b0cb6aeb5b5.jpg?v=ed846a95104247b95cf9151ce2ad7a89" alt="https://share.drewlearns.com/4gu15JQm"/></figure>
<!-- /wp:image -->

<!-- wp:list {"ordered":true,"start":17} -->
<ol start="17"><li>
<p>Check for updates:</p>
<pre><code>sudo yum check-update &amp;&amp; sudo yum update</code></pre>
</li></ol>
<!-- /wp:list -->

<!-- wp:html -->
<iframe width="1280" height="720" frameborder="0" scrolling="no" src="https://screencast-o-matic.com/player/crnj1wRW2Y?ff=1&amp;title=0&amp;controls=1" allowfullscreen="true"></iframe>
<!-- /wp:html -->

<!-- wp:separator -->
<hr class="wp-block-separator"/>
<!-- /wp:separator -->

<!-- wp:heading -->
<h2 id="2">PHP installation</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>PHP is our backend server language for WordPress. Let's get it installed.</p>
<!-- /wp:paragraph -->

<!-- wp:list {"ordered":true} -->
<ol><li>
<p>Let's confirm amazon-linux-extras, if you don't see a directory output then you'll have to install using <code>sudo yum install -y amazon-linux-extras</code> - I think this comes standard now, though I'm not positive.</p>
</li><li>
<p>Let's make sure that the PHP version we would like to use is available. Run: <code>sudo amazon-linux-extras | grep php</code>.</p>
</li></ol>
<!-- /wp:list -->

<!-- wp:quote -->
<blockquote class="wp-block-quote"><p>I personally prefer having my site as secure and performant as possible so I like the latest version where possible. I recognize some plugins/themes don't support latest versions of plugins/themes, in those cases I'd dump the plugin/theme over instead of lay blame on the PHP version as being the issue. I don't want plugins installed that don't operate on currently supported PHP versions myself.</p></blockquote>
<!-- /wp:quote -->

<!-- wp:list {"ordered":true,"start":3} -->
<ol start="3"><li>
<p>Install PHP 7.4 using the following command:</p>
<pre><code>sudo amazon-linux-extras enable php7.4 &amp;&amp; yum clean metadata &amp;&amp; sudo yum install php php-{pear,cgi,common,curl,mbstring,gd,mysqlnd,gettext,bcmath,json,xml,fpm,intl,zip,imap} -y</code></pre>
</li><li>
<p>Verify PHP is installed by running <code>php -v</code></p>
<blockquote><p>You may also be curious what PHP modules are installed, you can find this using <code>php -m</code></p></blockquote>
</li><li>
<p>Make sure PHP is installed, and running and no longer ephemeral by running the following:</p>
<pre><code>sudo chkconfig php-fpm on &amp;&amp; sudo service php-fpm start &amp;&amp; sudo service php-fpm status</code></pre>
</li></ol>
<!-- /wp:list -->

<!-- wp:html -->
<iframe width="1280" height="720" frameborder="0" scrolling="no" src="https://screencast-o-matic.com/player/crnj15RWou?ff=1&amp;title=0&amp;controls=1" allowfullscreen="true"></iframe>
<!-- /wp:html -->

<!-- wp:separator -->
<hr class="wp-block-separator"/>
<!-- /wp:separator -->

<!-- wp:heading -->
<h2 id="3">Install MariaDB (MySQL) &amp; Apache Webserver</h2>
<!-- /wp:heading -->

<!-- wp:list {"ordered":true} -->
<ol><li>
<p>Install it, but make sure to agree to installation.</p>
<pre><code>sudo yum install -y httpd mariadb-server</code></pre>
</li><li>
<p>Enable the database service:</p>
<pre><code>sudo systemctl enable --now mariadb</code></pre>
</li><li>
<p>Start and create a symlink for your Apache Web Server so that it starts on reboot automatically.</p>
<pre><code>sudo systemctl start httpd &amp;&amp; sudo systemctl enable httpd &amp;&amp; sudo systemctl is-enabled httpd</code></pre>
</li><li>
<p>Verify it's running by going to your EC2 Dashboard and clicking the instance ID link and then going to the IP address in your browser, it should look like this:</p>
<figure><img src="https://p289.p2.n0.cdn.getcloudapp.com/items/2NuE28jQ/c22492c4-aa9e-4e3b-bc9b-663567bf5b1c.jpg?v=61c5b56ef82950cdf6aa6c48fc5eeb2a" alt="https://p289.p2.n0.cdn.getcloudapp.com/items/2NuE28jQ/c22492c4-aa9e-4e3b-bc9b-663567bf5b1c.jpg?v=61c5b56ef82950cdf6aa6c48fc5eeb2a"></figure><p></p>
</li><li>
<p>Update your ec2-user's permissions to have access to manipulate the apache directory</p>
<pre><code>sudo usermod -a -G apache ec2-user &amp;&amp; exit</code></pre>
</li><li>
<p>Use your "Up" key to reuse your ssh connection command.</p>
<blockquote><p>If you use <code>groups</code> command, you will see "apache" listed for your user.</p></blockquote>
</li><li>
<p>Update the ownership of your www directory:</p>
<pre><code>sudo chown -R ec2-user:apache /var/www &amp;&amp; sudo chmod 2775 /var/www &amp;&amp; find /var/www -type d -exec sudo chmod 2775 {} \; &amp;&amp; find /var/www -type f -exec sudo chmod 0664 {} \;</code></pre>
</li></ol>
<!-- /wp:list -->

<!-- wp:html -->
<iframe width="1280" height="720" frameborder="0" scrolling="no" src="https://screencast-o-matic.com/player/crnjhURW12?ff=1&amp;title=0&amp;controls=1" allowfullscreen="true"></iframe>
<!-- /wp:html -->

<!-- wp:heading -->
<h2 id="4">Install a certificate with auto renewal:</h2>
<!-- /wp:heading -->

<!-- wp:list {"ordered":true} -->
<ol><li> <p>Run the following command to install EPEL (Extra Packages for Enterprise Linux)</p> <pre><code>sudo wget -r --no-parent -A 'epel-release-*.rpm' https://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/e/ &amp;&amp; sudo rpm -Uvh dl.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-*.rpm &amp;&amp; sudo yum-config-manager --enable epel* &amp;&amp; sudo yum repolist all</code></pre> </li><li> <p>Update your apache config file to show your new domain:</p> <pre><code>sudo nano /etc/httpd/conf/httpd.conf</code></pre> </li><li> <p>Locate the line that reads "Listen 80" and just after it paste the following:</p> <pre><code> &lt;VirtualHost *:80&gt; DocumentRoot "/var/www/html" ServerName "<code>example.com</code>" ServerAlias "<code>www.example.com</code>" &lt;/VirtualHost&gt;</code></pre> </li><li>Locate the line that starts with &lt;Directory "/var/www/html" and add these 2 lines inside the Directory brackets &amp; ddit the line that says <code>AllowOveride None</code> to say <code>AllowOveride All</code></li></ol>
<!-- /wp:list -->

<!-- wp:list {"ordered":true} -->
<ol><li> <p>Press "Command" + "X", then "Y", then "Return".</p> </li><li> <p>Restart Apache:</p> <pre><code>sudo systemctl restart httpd</code></pre> <blockquote><p>If you made any mistakes in the httpd.conf file, you will get errors about httpd.service failing. You can get more details about the error by running <code>systemctl status httpd.service</code></p></blockquote> </li><li> <p>Add your certbot and run it!</p> <pre><code>sudo yum install -y certbot python2-certbot-apache &amp;&amp; sudo certbot</code></pre> </li><li> <p>Enter your email address.</p> </li><li> <p>Press return, then "Y" and return again</p> </li><li> <p>Again, press return, then "Y" and return again</p> </li><li> <p>Type <code>1, 2</code>. (assuming you are using an alias domain like www you provided in httpd.conf file)</p> </li><li> <p>Automate the certbot!</p> <pre><code>sudo nano /etc/crontab</code></pre> <ul><li> <p>Add a cron job with root permissions to run <code>certbot renew --no-self-upgrade</code> twice daily at 01:30 &amp; 13:30:</p> <pre><code>30      1,13    *       *       *       root    certbot renew --no-self-upgrade</code></pre>  </li></ul></li><li> <p>Restart your cron daemon:</p> <pre><code>sudo systemctl restart crond</code></pre> </li></ol>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>Your site is now secure!</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<iframe width="1280" height="720" frameborder="0" scrolling="no" src="https://screencast-o-matic.com/player/crnjicRWbd?ff=1&amp;title=0&amp;controls=1" allowfullscreen="true"></iframe>
<!-- /wp:html -->

<!-- wp:separator -->
<hr class="wp-block-separator"/>
<!-- /wp:separator -->

<!-- wp:heading -->
<h2 id="5">Secure your Database</h2>
<!-- /wp:heading -->

<!-- wp:list {"ordered":true} -->
<ol><li> <p>Secure and test your database connection:</p> <pre><code>sudo mysql_secure_installation</code></pre> </li><li> <p>When prompted for a password press Return</p> </li><li> <blockquote><p>Change/Set the root password? [Y/n]</p></blockquote> <p>Press "y" and "return".</p> <pre><code>New password:  Re-enter new password: </code></pre> </li><li> <blockquote><p>Remove anonymous users? [Y/n]</p></blockquote> <p>Press "y" and "return".</p> </li><li> <blockquote><p>By default, a MariaDB installation has an anonymous user, allowing anyone<br>to log into MariaDB without having to have a user account created for<br>them. This is intended only for testing, and to make the installation<br>go a bit smoother. You should remove them before moving into a<br>production environment.<br>Remove anonymous users? [Y/n]</p></blockquote> <p>Press "y" and "return".</p> </li><li> <blockquote><p>Normally, root should only be allowed to connect from 'localhost'. This<br>ensures that someone cannot guess at the root password from the network.<br>Disallow root login remotely? [Y/n]</p></blockquote> <p>Press "y" and "return".</p> </li><li> <blockquote><p>Disallow root login remotely? [Y/n]</p></blockquote> <p>Press "y" and "return".</p> </li><li> <blockquote><p>Remove test database and access to it? [Y/n] y</p></blockquote> <p>Press "y" and "return".</p> </li><li> <blockquote><p>Reload privilege tables now? [Y/n]</p></blockquote> <p>Press "y" and "return".</p> </li><li> <p>Start your MariaDB:</p> <pre><code> ​sudo systemctl enable --now mariadb</code></pre> </li><li> <p>Make sure you can log in by typing:</p> <pre><code>mysql -u root -p</code></pre> </li><li> <p>Create a new user, obviously change "wordpress-user" and "your_strong_password" to suite</p> <pre><code>CREATE USER 'wordpress-user'@'localhost' IDENTIFIED BY 'your_strong_password';</code></pre> <blockquote><p>Query OK, 0 rows affected (0.001 sec)</p></blockquote> </li><li> <p>Create your database and name it something meaningful:</p> <pre><code>CREATE DATABASE `WordPres<code>s-db</code>`;</code></pre> <blockquote><p>💡 Don't forget to close that command out with a <code>;</code></p></blockquote> </li><li> <p>Provide that database full privileges for your user. Be sure to update the wordpress-db name and the wordpress-user name to match what you just called it in the previous ste.</p> <pre><code>GRANT ALL PRIVILEGES ON `<code>WordPress-db</code>`.* TO "wordpress-user"@"localhost";</code></pre> </li><li> <p>Flush your privledges to pick up all your new configurations:</p> <pre><code>FLUSH PRIVILEGES;</code></pre> </li><li> <p>Exit your mysql prompt with <code>exit</code>.</p> </li></ol>
<!-- /wp:list -->

<!-- wp:html -->
<iframe width="1280" height="720" frameborder="0" scrolling="no" src="https://screencast-o-matic.com/player/crnjifRWFr?ff=1&amp;title=0&amp;controls=1" allowfullscreen="true"></iframe>
<!-- /wp:html -->

<!-- wp:separator -->
<hr class="wp-block-separator"/>
<!-- /wp:separator -->

<!-- wp:heading -->
<h2 id="6">Install WordPress</h2>
<!-- /wp:heading -->

<!-- wp:list {"ordered":true} -->
<ol><li>Let's install a base WordPress image onto our WordPress</li></ol>
<!-- /wp:list -->

<!-- wp:quote -->
<blockquote class="wp-block-quote"><p>The following command downloads, cleans up and creates a wp-config.php file.</p></blockquote>
<!-- /wp:quote -->

<!-- wp:code -->
<pre class="wp-block-code"><code>            cd /var/www/html/ &amp;&amp; sudo wget https://wordpress.org/latest.tar.gz &amp;&amp; sudo tar -xzf latest.tar.gz &amp;&amp; sudo rm latest.tar.gz &amp;&amp; sudo cp -r /var/www/html/wordpress/* /var/www/html/ &amp;&amp; cp wp-config-sample.php wp-config.php &amp;&amp; sudo rm wp-config-sample.php &amp;&amp; nano wp-config.php</code></pre>
<!-- /wp:code -->

<!-- wp:list {"ordered":true,"start":3} -->
<ol start="3"><li> <p>Use your d-pad to navigate and edit the following fields with the information you created in the section above.</p> Remember this is not your maria-db root password for your DB_PASSWORD field! <figure><img src="https://p289.p2.n0.cdn.getcloudapp.com/items/ApuRNRYX/00623608-85b0-4d77-8bce-7081a43f413b.jpg?v=8443c1e9b5bbf5396d185d81c508729a" alt="https://share.drewlearns.com/ApuRNRYX"></figure> </li><li> <p>Edit your Salts:</p> <figure><img src="https://p289.p2.n0.cdn.getcloudapp.com/items/OAugRgjR/9e075603-077c-488f-aa22-e685f3793c29.jpg?v=cf5eadc8e9f921f963261a703cc4b593" alt="https://share.drewlearns.com/OAugRgjR"></figure> </li><li> <p>Change your database table prefix to something more obscure than <code>wp_</code> and make it something like <code>wp_123456_</code>. Bear in mind, it has to end with an underscore.</p> </li><li> <p>Press "Control" + "X" to close the editor and then press "Y" then "Return" to save.</p> </li><li> <p>We have to make sure the server has complete access to these files so we need to edit their permissions:</p> <blockquote><p>🚨 If you miss this step or it fails, you'll get a weird ftp credential popup when trying to install plugins/themes.</p></blockquote> <pre><code>sudo chown -R apache:apache /var/www/html</code></pre> </li><li> <p>Navigate in a browser to your domain. You should be prompted with a WordPress Welcome screen. Fill out those details.</p> </li></ol>
<!-- /wp:list -->

<!-- wp:html -->
<iframe width="1280" height="720" frameborder="0" scrolling="no" src="https://screencast-o-matic.com/player/crnjiXRWql?ff=1&amp;title=0&amp;controls=1" allowfullscreen="true"></iframe>
<!-- /wp:html -->

<!-- wp:separator -->
<hr class="wp-block-separator"/>
<!-- /wp:separator -->

<!-- wp:heading -->
<h2 id="7">Set up FTP/SFTP for file transfer</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Currently your site is lacking connectivity to the EC2's file system. We need to add FTP or SFTP. This will allow us to install plugins and more. You may be curious or interested in the ability to upload your file system to S3 and since I'm currently over my PUTS limit this month, I'll be holding out on a tutorial about this for a little while. If you are really wanting to do it though, here is a good guide I found: <a href="https://docs.aws.amazon.com/codedeploy/latest/userguide/tutorials-wordpress-upload-application.html">https://docs.aws.amazon.com/codedeploy/latest/userguide/tutorials-wordpress-upload-application.html</a></p>
<!-- /wp:paragraph -->

<!-- wp:list {"ordered":true} -->
<ol><li> <p>Add an FTP plugin to your server:</p> <pre><code>sudo yum install vsftpd -y</code></pre> </li><li> <p>Restart your FTP server:</p> <pre><code>sudo systemctl restart vsftpd</code></pre> </li><li> <p>Add a new SFTP user to your site using the following two commands, bear in mind you can choose any username you'd like, these are just placeholders.</p> <pre><code>sudo adduser awsftpuser</code></pre> <p>&amp;</p><pre><code>sudo passwd awsftpuser</code></pre> <p>You'll then be prompted for a password twice.</p> </li><li> <p>Grant that user permissions to update the home directory:</p> <pre><code>sudo usermod -d /etc/httpd/ awsftpuser &amp;&amp; sudo usermod -a -G root awsftpuser &amp;&amp; sudo systemctl restart vsftpd &amp;&amp; sudo chkconfig --level 345 vsftpd on</code></pre> </li><li> <p>Edit your vsftpd conf file by typing:</p> <pre><code>sudo nano /etc/vsftpd/vsftpd.conf</code></pre> <p>Find the line that reads:</p> <pre><code># Allow anonymous FTP? (Beware - allowed by default if $  anonymous_enable=YES</code></pre> <p>to</p> <pre><code># Allow anonymous FTP? (Beware - allowed by default if $  anonymous_enable=NO</code></pre> <p>Uncomment out the line that reads:<br>chroot_local_user=YES</p> <p>At the bottom of the file add:</p> <pre><code>pasv_enable=YES pasv_min_port=1024 pasv_max_port=1048 pasv_address=</code></pre> <blockquote><p>🚨Don't forget to change the part of that line. You can grab this from your EC2 dashboard by clicking on the instance ID.</p></blockquote> </li><li> <p>Press "Control" + "X" to close the editor and then press "Y" then "Return" to save.</p> </li><li> <p>Restart the FTP pod one more time:</p> <p>sudo systemctl restart vsftpd</p> </li></ol>
<!-- /wp:list -->

<!-- wp:html -->
<iframe width="1280" height="720" frameborder="0" scrolling="no" src="https://screencast-o-matic.com/player/crnji4RWrK?ff=1&amp;title=0&amp;controls=1" allowfullscreen="true"></iframe>
<!-- /wp:html -->

<!-- wp:separator -->
<hr class="wp-block-separator"/>
<!-- /wp:separator -->

<!-- wp:heading -->
<h2 id="9">Migrate your site to the AWS server!</h2>
<!-- /wp:heading -->

<!-- wp:separator -->
<hr class="wp-block-separator"/>
<!-- /wp:separator -->

<!-- wp:paragraph -->
<p>Your WordPress Site is now up and running. If you already have a site on another host, you can migrate it.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>The Easiest way to migrate a site is to install a plugin called "Migrate Guru: Migrate &amp; Clone WordPress Free" on both sites and let it do the magic.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>If you'd like a more indepth discussion on how to manually migrate your site's files and database from one host to another Let me know in the comments section below.</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<iframe width="1280" height="720" frameborder="0" scrolling="no" src="https://screencast-o-matic.com/player/crnjipRW3R?ff=1&amp;title=0&amp;controls=1" allowfullscreen="true"></iframe>
<!-- /wp:html -->