WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Change URL, Main Site Functional, Subfolders Not (3 posts)

  1. b4sher
    Member
    Posted 4 years ago #

    Hey everyone...
    Recently I installed wordpress on a ubuntu server and my url was "http://test.example.com/wordpress". I could access it, even got SSL up and running with it. So before the URL change, everything was working fine.
    My goal was to change it so the url was "http://test.example.com/" and have everything working from there. So I edit my apache files and redirect the root directory to /var/www/wordpress and a2ensite the apache files. Then I added to my wp-config.php file the following:

    define('WP_HOME','http://test.example.com');
    define('WP_SITEURL','http://test.example.com');

    I change my SQL database url value and home value to reflect the changes. I restart apache and mysql and I can get to my site at "http://test.example.com". Once I try to log in, it says the page cannot be found (404). Just to make sure my folders are right...I added a simple index.html file in the wp-admin folder and navigated to it at "http://test.example.com/wp-admin/" and it display the index.html file fine. So I believe there is a setting in WP that I am overlooking. I went through the instructions on the site and some various other sites with no avail. All links on the site work except the Login link. Any suggestions?

    For example: https://test.example.com/wp-login.php
    The requested URL /wp-login.php was not found on this server.

    I appreciate your help!

  2. b4sher
    Member
    Posted 4 years ago #

    Update:

    I can get to the css stripped login page at:

    https://test.example.com/wordpress/wp-login.php

    but of course I can log in due to the database not pointing to the right direction. Any suggestions?

  3. b4sher
    Member
    Posted 4 years ago #

    OK, a little embarrassed now. I didn't change the apache/sites-enabled/defualt-ssl DocumentRoot to point to the new root directory. Thus when they were accessing wp-login.php via ssl...it was still looking in /var/www/.

Topic Closed

This topic has been closed to new replies.

About this Topic