Mobile app version of vmapp.org
Login or Join
Murray155

: Wordpress keeps redirecting to non-existent wordpress directory I've uploaded WordPress to my GoDaddy and when I go to example.com/wp-login.php to login page looks bare. I would expect to see the

@Murray155

Posted in: #301Redirect #Authentication #HttpCode500 #Redirects #Wordpress

I've uploaded WordPress to my GoDaddy and when I go to example.com/wp-login.php to login page looks bare. I would expect to see the styled default WordPress login page and secondly when pressing submit it causes a 500 internal server error, because the page is redirect to example.com/wordpress/wp-login.php, which is basically looking into /wordpress/ and not the root.

I've tried looking for this /wordpress/ directory in wp_config as well as used interconnectit to replace any example.com/wordpress/ entries with just example.com, but it didn't find any such entries in the database either.

I've also tried messing with .htaccess, such as removing '/wordpress/' from it, but that causes just more trouble. I've no idea where this redirect to /wordpress/ comes from, anyone?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Murray155

1 Comments

Sorted by latest first Latest Oldest Best

 

@Nimeshi995

WordPress by default will uncompress to /wordpress/ from the downloadable archive, this is because the compressed file contains the parent directory labelled wordpress. If you then run the installer from this folder it will automatically set the path to this location within the SQL.
Unless your using a SEO plugin that controls the SEF URLS then there is only several ways that WordPress will redirect, these are: SQL, .HTACCESS and WP-CONFIG.PHP

WP-CONFIG

Unlike older versions of Joomla and other other content management systems by default WordPress does not set the URL path, unless you edit this file and change the defined path. The define untouched looks like:

if ( !defined('ABSPATH') )
define('ABSPATH', dirname(__FILE__) . '/');


HTACCESS

WordPress by default does not control the install path using the htaccess file, a default htaccess should look exactly like this:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>


SQL

WordPress by default on install will add two entries into your SQL database:


wp-options


option_name: siteurl option_value: www.example.com option_name: home option_value: www.example.com


You shouldn't need to edit the database directly, as WordPress allows you to change the siteurl, and home path directly in your WordPress.


Navigate to www.example.com/wordpress/wp-login.php Login to the administration dashboard
Click Settings
Click General
Change WordPress Address (URL)
Change Site Address (URL)
Click Save


Your settings should look something like this:



If for whatever reason you can't login then use phpMyAdmin to change the values outside of the WordPress environment.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme