[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

How to change default base URL on Linux Ubuntu

Posted on 2012-03-22
7
Medium Priority
?
664 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

 
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 2000 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
The viewer will learn how to count occurrences of each item in an array.
Suggested Courses

649 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