Showing posts with label editing wordpress url. Show all posts
Showing posts with label editing wordpress url. Show all posts

Solved: How to remove the AWS EC2 instance name from the URL?

After installing the website using AWS image you would have noticed that the URL still have reference of the EC2.
It can be in post URLs like
How to get rid of that?
The easiest way to do it is by going to your wordpress dashboard.
In the dashboard go to Settings>General.
In the General Settings page you will see two parameters, WordPress Address (URL) and Site Address (URL).  Change them to your website name e.g. .
Finally save it. Your post URLs should now look like
In Bitnami WordPress Image you will find that WordPress Address (URL) and Site Address (URL) will be greyed out and it won’t allow to modify them. In that case you will have to modify wp-config.php file.
For bitnami image the file location is /opt/bitnami/apps/wordpress/htdocs/wp-config.php. Keep a copy of old file and modify the current file
cp -p /opt/bitnami/apps/wordpress/htdocs/wp-config.php /opt/bitnami/apps/wordpress/htdocs/wp-config.php.oldsudo vi /opt/bitnami/apps/wordpress/htdocs/wp-config.php
Modify two lines which has entries for WP_HOME and WP_SITEURL . They  should now look like.
If your website is having SSL certificate and you want all your posts and pages to have https. Than the above entries should look like.

Finally save the file.
When you refresh the page it should now show your desired URL.
If the URL is still not showing correctly and you are sure that you have modified the file correctly than restart apache.
sudo /opt/bitnami/ restart apache
This should get you done!