Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Having problems changing the default URL to root in wordpress

I created a server on Bitnami hosting and installed Wordpress on my EC2 instance. I am facing two issues now:

  1. I am able to access my wordpress website using http://<my_domain>/wordpress but I want it to be accessed directly by visiting http://<my_domain>. I know there are many ways that are listed on your website but none of them worked for me. one thing that I noticed is that I can achieve the same using wordpress address and Site address fields in the general settings of wordpress, but those fields are greyed out in my wordpress application and I am unable to change those fields, can you please tell me why they are greyed out and how I can activate them?

  2. I tried to solve my problem by using the tips given in http://wiki.bitnami.org/Applications/BitNami_Wordpress_Stack#How_to_change_the_WordPress_domain_name.3f Now, for some reason, I am not able to access my site at all. I had taken a backup before meddling with my htaccess and conf files, when my server became unreachable, i simply restored the backup and refreshed my page. But I am not able to solve the problem and I am unable to use my dashboard.

like image 272
shripadsrd Avatar asked Oct 15 '12 14:10

shripadsrd


1 Answers

The standard process is to run the following command:

$ sudo /opt/bitnami/apps/wordpress/updateip --appurl /

This command changes the following options:

Check the /opt/bitnami/apps/wordpress/conf/wordpress.conf file. It should be similar to this:

# App url moved to root
DocumentRoot "/opt/bitnami/apps/wordpress/htdocs"
#Alias /wordpress/ "/opt/bitnami/apps/wordpress/htdocs/"
#Alias /wordpress "/opt/bitnami/apps/wordpress/htdocs"

<Directory "/opt/bitnami/apps/wordpress/htdocs">
    Options Indexes MultiViews +FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
    RewriteEngine On
    #RewriteBase /wordpress/
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . index.php [L]
</Directory>

Then clear your browser cache and try to access again to your URL.

If you want to configure the gray out options in the WordPress admin panel, you can specify your domain name at /opt/bitnami/apps/wordpress/htdocs/wp-config.php. Replace $_SERVER['HTTP_HOST'] with your own domain name.

define('WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST'] . '/');
define('WP_HOME', 'http://' . $_SERVER['HTTP_HOST'] . '/');

I hope it helps.

like image 104
Beltran Avatar answered Oct 12 '22 12:10

Beltran