AWS: Wordpress install - wordpress

I hope you can help.
I'm trying to setup a wordpress blog. In the past I've been using HostGator but now making the switch to AWS. However, I'm having problems with the basics.
I have created an instance and managed to login to the instance via putty.
In S3 I have created 2 buckets. lmof.uk and www.lmof.uk (following one of the AWS guides) and uploaded a php file to lmof.uk
In Route 53, I have added the Domain to the Hosted Zone, created A record and CNAME as well.
Updating my Nameservers from my register and if you visit lmof.uk it downloads the php file.
When I log into my Putty, I can't seem to find the php file anywhere. I followed this guide: https://www.youtube.com/watch?v=PbQSs-_d-yM but when it came to looking at my public ip address, the connection times out.
I'm sure I'm missing something fundamental, but at this stage I'm just looking to install wordpress, see the files, edit them and see the changes on the website.

you forgot to open port 80 on security groups.follow the link below
Opening port 80 EC2 Amazon web services

Related

Wordpress AWS route 53 setup

I currently have wordpress installed on EC2 instance with an elastic IP. I have route 53 setup for an existing domain with a type A record set pointing to the elastic IP.
When I access the domain name in my browser, some of the web resources (js, css files) being loaded by the browser still point to the old public dns (ec2-x-xx-xx-xxx.<zone>.compute.amazonaws.com), so they fail to load and the site does not fully loaded. How do I fix this?
I found the solution here. Under the section 'Help! My Public DNS Name Changed and now my Blog is Broken'.
The reason I was having this issue in the first place was because I switched my EC2 IP to elasticIP after I installed and setup wordpress. So wordpress had the old IP in its installation. If I had setup the elasticIP before installing wordpress I would not have had this issue. But the above the link helped me solve it.

How to fix a cloned AMI with another domain SSL certificate on it for Wordpress on AWS?

In 2018 I made a Wordpress site by using a Bitnami AMI for a AWS EC2. Fine developed a site and created another custom AMI of the finalized Wordpress site. This was for domain X.
Now in 2020 I wanted to duplicate that website by using this custom AMI for domain Y. I have created an EC2 based on that custom AMI and instance went online without problems.
The problem is now that I can not reach the site by its url, I got blocked by "This connection is invalid", I also see that certificate is still based on the domain of 2018, thus is invalid. So I think that the issue is caused by the SSL configuration based on domain X while it is iinitiated for domain Y. But since I am not able to reach the site neither the admin panel, I am wondering how I can disable the SSL/HTTPS enforcement so that I can reach the site and admin panel?
I do have access to SSH, so probably I should be able to do something from there? But totally not known with that type OS and usage via SSH.
Bitnami Engineer here,
As you created a snapshot of the 2018 instance, the new instance has the same configuration you had at that time. Please check the following items so you can update the certificates and the app's configuration to work properly using your new domain name:
The certificates are configured in the /opt/bitnami/apache2/conf folder by default. You probably substituted the ones we include with valid certificate files for your domain in 2018. You will need to substitute the server.crt and server.key now with the new ones.
https://docs.bitnami.com/aws/apps/wordpress/administration/enable-https-ssl-apache/
Regarding the WordPress configuration, we have configuration tool that takes care of updating the domain name in the database. Can you take a look at this guide?
https://docs.bitnami.com/aws/faq/configuration/configure-custom-domain/
You will basically need to run sudo /opt/bitnami/apps/wordpress/bnconfig --machine_hostname my-new-domain.com.
I also suggest you check the WordPress' configuration file (/opt/bitnami/apps/wordpress/htdocs/wp-config.php) to see if you edited the WP_HOME and WP_SITE parameters there.

PhpMyadmin not working on AWS EC2 instance

I created an EC2 instance on AWS and hosted Wordpress powered by Bitnami.
I used t2 micro to select free tier and successfully published with custom keyfile.
Anyhow, I need to host existing code to this hosting and I have issues accessing phpmyadmin.
It says "For security reasons, this URL is only accessible using localhost(12.0.0.1) as the hostname.
I have tried several solutions but cannot find the exact conf file.
Thanks in advance, please help me.
I don't know what your current setup, but while a year before I face the same issue while setting up my company website.
edit config.inc.php file in your phpmyadmin installed folder .
Default path is :
sudo vi /opt/bitnami/apps/phpmyadmin/htdocs/config.inc.php
search for
$cfg['PmaAbsoluteUri'] ='http://127.0.0.1:80/phpmyadmin';
edit the 127.0.0.1 to your domain IP or domain name
hope it resolve your issue.
I forgot the reference link where I got these detail I will add it later.
Restart apache after all
Below is one of the solutions I found.
ssh -N -L 8888:127.0.0.1:80 -i *.pem #...*
This maps the phpmyadmin on user's localhost so the user can access using http://localhost:8888/phpmyadmin.
Hope this helps.

How do I set up AWS Route 53 to handle an EC2 single instance domain

I have thoroughly reviewed both the Amazon Web Services documentation and many Stackoverflow posts related to my issue, but have not yet resolved it. My situation:
I have successfully set up:
an EC2 t2.micro instance with elastic IP, running Ubuntu 14.04.01 /
Apache2 / PHP / MySQL (LAMP)
WordPress 4.5 as a content management system
CiviCRM 4.1 as a constituent management app
I am able to access and run this configuration with the public DNS linked to the Elastic IP. I have a custom domain (mydomain.org) registered through Amazon Route 53 and have set up the necessary record sets (A, CNAME) to connect both mydomain.org and www.mydomain.org to the EIP. This configuration, accessed with HTTP, correctly serves the base page of the app, and I see what I expect from WordPress, with mydomain.org showing in the browser address window.
When I navigate to any other page, it breaks. I see the page, but the displayed URL is that of the EIP public DNS, not my custom domain. I suspect that rewriting the URL in the Virtual Hosts section of my provide a solution, but I haven't been able to determine the proper statements.
Further, I need to have this configuration support TLS / HTTPS. I have successfully obtained and installed the necessary certificates and set them up in my server configuration. I have edited the ssl.conf Virtual Hosts file, and have even been able, using HTTPS to successfully navigate to the base page of WordPress. It shows the basic HTML of the page, but all of the script driven formatting is missing. Again, navigating to any other page of the app breaks the TLS by using the EIP URL, not my custom URL.
I suspect the same solution to the initial issue will fix this issue, as well.
Thank you, in advance, for your advice and suggestions.
Bruce P pointed me in a good direction. I checked VirtualHosts in my .conf file; found it OK. Looked for httpd.conf without success, and reviewed my WordPress configuration, which is where I found the problem. The server information was not updated to reflect the changed URL. When I did that, all significant problems were resolved. Thanks, again, to Bruce P for pointing me in a good direction.
DVH

Wordpress on AWS EC2 - broken after assigning elastic IP

So, I got Wordpress installed and working just fine. I can access the site and the wp-admin via the public DNS that I get from the instance.
However, once I create an elastic IP and associate it with the instance, I can no longer access wp-admin and the home page style sheets and JavaScript files are not loaded.
I am attempting to access the site and the wp-admin using the new public IP from the elastic IP. Same thing is true if I try to use the public DNS from either the elastic IP or the EC2 instance.
When I view the page source I see that the reason things aren't loaded is because the URL for all of the assets (.css, .js. etc,) is pointing to the bold public DNS
When I disassociate the elastic IP things do not go back to working again.
I'm missing something but don't know what.
Any help would be appreciated
Your wordpress admin is already associated with your publicDNS. This is because, when you have logged-in the wp-admin console, you have created a new admin user. This information with respect to your publicDNS was saved in the mysql db. So you won't be able to access wp-admin from the elastic IP.
What you can do ?
You can log-in to your wordpress mysql and update all the references of the publicDNS to Elastic IP. Once it is done, you will be able to access the wp-admin from the static IP.
I run into the same problem. A quick fix is to hardcode your site URL into the wp-config.php which you can edit via FTP.
define('WP_HOME','http://yoursite.com');
define('WP_SITEURL','http://yoursite.com');
Worked fine for me.
See also https://codex.wordpress.org/Changing_The_Site_URL for guideline.
I too faced the same issue, followed the steps in this page to get my issue fixed.
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/hosting-wordpress.html
Follow steps under this section:
"Help! My Public DNS Name Changed and now my Blog is Broken"
Pasting it here for quick reference: Login via ssh to your ec2 instance then run the below commands:
Download the wp-cli with the following command
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
Search and replace the old site URL in your WordPress installation with the following command. Substitute the old and new site URLs for your EC2 instance and the path to your WordPress installation (usually /var/www/html or /var/www/html/blog)
php wp-cli.phar search-replace 'old_site_url' 'new_site_url' --path=/path/to/wordpress/installation --skip-columns=guid

Resources