?
Solved

How to change default base URL on Linux Ubuntu

Posted on 2012-03-22
7
Medium Priority
?
639 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
Create CentOS 7 Newton Packstack Running Keystone

A bug was filed against RDO for the installation of Keystone v3. This guide is designed to walk you through the configuration for using Keystone v3 with Packstack. You will accomplish this using various repos and the Answers file.

 
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
This article discusses four methods for overlaying images in a container on a web page
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Suggested Courses

752 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