Change default URL on bitnami EC2 application - wordpress

I'm running wordpress on a micro EC2 instance using a bitnami AMI (ami-8333ffea to be exact) but I think this question applies to any bitnami cloud application. I've designated an Elastic IP and mapped a subdomain to the instance (e.g., blog.example.com). So far, so good.
Now I can access the blog but the URLs all contain '/wordpress' (blog.example.com/wordpress/.../). Bitnami has documentation (click 'Cloud Image/Bitnami Hoting' tab) for fixing this but I've tried following it several times without success. I make the changes, the site still works but '/wordpress' is still there taunting me. The machine is running Apache2 and the instructions all seem to make sense. I'm not sure what I'm doing wrong. Please help.

Probably the WordPress siteurl setting was not updated. The following command has to be executed:
sudo /opt/bitnami/mysql/bin/mysql -u root -p -e "use bitnami_wordpress; update wp_options set option_value='http://blog.example.com' where option_name='siteurl' or option_name='home'"
Make sure that you substitute "blog.example.com" in the example above with your own domain name.
And after changing the httpd.conf file, the Apache web server should be restarted:
sudo /opt/bitnami/ctlscript.sh restart apache
You can take a look at the BitNami Cloud Hosting article explaining how to assign a custom domain to your server, you can directly jump to the 6th section.
If you have BitNami specific questions, consider visiting BitNami Support page bitnami.org/support.

Related

ERR_CONNECTION_TIMED_OUT Wordpress website hosted on GCP

I'm new to GCP and using Bitnami I installed wordpress on GCP and redirected my domain to GCP. As I don't know much about cloud computing it worked and was working fine until a few days ago when anyone opens the website it takes some time to load and after that it shows:
ERR_CONNECTION_TIMED_OUT
I tried searching online but it's a common error and there is a lot of other information but nothing in regards to GCP. Now I don't know what to check in GCP to see if it's working but here is a screenshot of Compute Engine for the website:
Screenshot of Compute Engine
And the Cloud Platform Status seems to be fine too:
Screenshot of Cloud Platform Status
Comment if you need more info as I can't seems to figure out what to share here so that the thing causing this error can be identified.
Bitnami Engineer here. If the IP of your instance changed, you will need to change your DNS records to use that new one.
Regarding the default Apache's page, it seems you installed the apache system's package and that's why you see that page. You will need to stop and remove that service
sudo service apache2 stop && sudo service apache2 disable
and start the Bitnami's one again
sudo /opt/bitnami/ctlscript.sh start

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.

Unable to successfully change wordpress site URL

I'm trying to set up Wordpress with Multisite, and the first thing I'm trying to do after getting the Bitnami AMI running on an EC2 host is assign an Elastic IP. However, as soon as I assign this, I'm unable to get to my Wordpress login page due to redirect issues.
When I try to go to my new URL of http://ec2-xx-xx-xx-xx.us-west-2.compute.amazonaws.com, I get redirected to http://ec2-xx-xx-xx-xx.us-west-2.compute.amazonaws.com/wp-signup.php?new=ec2-xx-xx-xx-xx.us-west-2.compute.amazonaws.com, with a redirect loop error shown by my browser. (The IP address, noted with x's, is the same in all 3 cases).
Also, as expected, my apache access_log spits out 20 of the following lines when I try to access my site:
[05/Jun/2016:19:56:41 +0000] "GET /wp-signup.php?new=ec2-xx-xx-xx-xx.us-west-2.compute.amazonaws.com HTTP/1.1" 302 -
Things that do work
Before I assign the Elastic IP, I can access the Wordpress site from http://ec2-yy-yy-yy-yy.us-west-2.compute.amazonaws.com, as long as I dont make any changes to the site URL after spinning up the EC2 instance with the Bitnami Wordpress AMI.
After assigning the Elastic IP, I can SSH into the EC2 instance with both the new IP and the corresponding *.compute.amazonaws.com hostname.
Things I tried
Following these steps, I've...
Updated DOMAIN_CURRENT_SITE in my wp-config.php, as well as updated site_url and home to match the new hostname.
Added WP_HOME and WP_SITEURL to my wp-config.php
Added the RELOCATE flag
None of those appear to fix the redirection issue.
Aha - I found another link that states migrating a Multisite setup is a bit more involved, and requires searching through all database tables for any references to the old hostname:
http://codex.wordpress.org/Moving_WordPress
Searching through all the tables in phpmyadmin... I did find some more references! After updating all of these, I can now get to my site using the new Elastic IP.
Bitnami stacks come with a tool to automatically configure the machine IP of the installation. In the case of WordPress, you just need to SSH into your machine and execute the following command:
sudo /opt/bitnami/apps/wordpress/bnconfig --machine_hostname NEW_DOMAIN
Hope it helps.

Scalable Wordpress on AWS Elastic Beanstalk, 404 permalink issue

I installed a clean Wordpress on AWS Elastic Beanstalk (Separate MySQL database on RDS and multiple EC2 instances (AWS Linux 64bit PHP 5.5)). I did some testing and was able to scale the system up to multiple servers and back down - everything was working beautifully. Problems started when I changed permalink settings in Wordpress from "Default" to "Post name", after which I tried to access Wordpress Hello world sample page again and got 404 error with an error message: The requested URL /hello-world/ was not found on this server. This only happens sometimes. If you keep clicking on the post link, many times it serves the page right (with the post name correctly in the URL), but sometimes it gives 404. I deleted the environment and started from scratch but got the same result.
Any idea how to fix this? Any other recommendations to consider when setting up auto-scalable Wordpress site on AWS?
Thanks for all the help and advice in advance.
Does apache have the permissions to rewrite the .htaccess file? Never used beanstalk but in AWS EC2 mostly this is the solution. In your console try this command
sudo chown -R apache:apache /var/www/html
/* Change the directory, if your wordpress is installed somewhere else */

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