Solved

How to change default base URL on Linux Ubuntu

Posted on 2012-03-22
7
566 Views
Last Modified: 2012-03-22
Hello Experts,
I'm trying to migrate a wordpress site from windows to Linux Ubuntu 10.4 LTS. I managed to get the wordpress and mysql up however I have a strange redirection problem. Here is what happens;
When I enter Localhost the site comes with some problems which I need to login as wp-admin and set some localhost settings however when I try to login wp-admin the address should be like localhost/wp-admin but for some strange reason the system redirects the URL as http://localhost/evoMag/wp-login.php?redirect_to=http%3A%2F%2Flocalhost%2Fwp-admin%2F&reauth=1 it should be free of evoMag which I have no idea where it comes from or how to get rid off that. When I manually delete evomag the login secreen comes ok but after I put my username and password the system adds evomag in the URL thus I can not login.  
My guess is there is some sort of default redirection (as you can see it in the attachment) or some base rule applied. Does anybody has any idea how to get rid of this?
PS: I have installed webmin and GUI on Ubuntu.
Base-URL.jpg
0
Comment
Question by:dahter
  • 4
  • 3
7 Comments
 
LVL 8

Expert Comment

by:Ahmed Merghani
ID: 37751277
Can you post the content of "wp-login.php" ?
0
 
LVL 8

Expert Comment

by:Ahmed Merghani
ID: 37751290
Sorry, I mean "wp-config.php" file.
0
 

Author Comment

by:dahter
ID: 37751291
Here You go, I already double checked that but there might be something that I miss. For security reasons I changed the username and Password lines.



<?php
/**
 * The base configurations of the WordPress.
 *
 * This file has the following configurations: MySQL settings, Table Prefix,
 * Secret Keys, WordPress Language, and ABSPATH. You can find more information
 * by visiting {@link http://codex.wordpress.org/Editing_wp-config.php Editing
 * wp-config.php} Codex page. You can get the MySQL settings from your web host.
 *
 * This file is used by the wp-config.php creation script during the
 * installation. You don't have to use the web site, you can just copy this file
 * to "wp-config.php" and fill in the values.
 *
 * @package WordPress
 */

// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'wordpress');

/** MySQL database username */
define('DB_USER', 'USERNAME');

/** MySQL database password */
define('DB_PASSWORD', 'PASSWORD');

/** MySQL hostname */
define('DB_HOST', 'localhost');

/** Database Charset to use in creating database tables. */
define('DB_CHARSET', 'utf8');

/** The Database Collate type. Don't change this if in doubt. */
define('DB_COLLATE', '');

/**#@+
 * Authentication Unique Keys and Salts.
 *
 * Change these to different unique phrases!
 * You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service}
 * You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.
 *
 * @since 2.6.0
 */
define('AUTH_KEY',         'put your unique phrase here');
define('SECURE_AUTH_KEY',  'put your unique phrase here');
define('LOGGED_IN_KEY',    'put your unique phrase here');
define('NONCE_KEY',        'put your unique phrase here');
define('AUTH_SALT',        'put your unique phrase here');
define('SECURE_AUTH_SALT', 'put your unique phrase here');
define('LOGGED_IN_SALT',   'put your unique phrase here');
define('NONCE_SALT',       'put your unique phrase here');

/**#@-*/

/**
 * WordPress Database Table prefix.
 *
 * You can have multiple installations in one database if you give each a unique
 * prefix. Only numbers, letters, and underscores please!
 */
$table_prefix  = 'wp_';

/**
 * WordPress Localized Language, defaults to English.
 *
 * Change this to localize WordPress. A corresponding MO file for the chosen
 * language must be installed to wp-content/languages. For example, install
 * de_DE.mo to wp-content/languages and set WPLANG to 'de_DE' to enable German
 * language support.
 */
define('WPLANG', 'tr_TR');

/**
 * For developers: WordPress debugging mode.
 *
 * Change this to true to enable the display of notices during development.
 * It is strongly recommended that plugin and theme developers use WP_DEBUG
 * in their development environments.
 */
 // Enable WP_DEBUG mode
define('WP_DEBUG', false);


/* That's all, stop editing! Happy blogging. */

/** Absolute path to the WordPress directory. */


/** Sets up WordPress vars and included files. */
define('WP_CACHE', false);
require_once(ABSPATH . 'wp-settings.php');
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 8

Expert Comment

by:Ahmed Merghani
ID: 37751310
Sorry again but it seems you did not see my last comment to post "wp-config.php"

I want to check these lines:
define('WP_HOME','http://example.com');
define('WP_SITEURL','http://example.com');
0
 

Author Comment

by:dahter
ID: 37751327
Above post is the content of wp-config.php I do not have those lines in my config file.
0
 
LVL 8

Accepted Solution

by:
Ahmed Merghani earned 500 total points
ID: 37751361
I am confused. See this link:
http://codex.wordpress.org/Changing_The_Site_URL
0
 

Author Closing Comment

by:dahter
ID: 37752010
Adding those lines solved my problem. Thanks.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now