Sign up ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Thank you in advance for any help you might provide. I have read many other posts, and unfortunately the provided solutions did not work.

The problem is this: I have Wordpress installed in a supdirectory and would like to change the front end url to

When I go to Settings > General and change the Site Address (URL) to and check the front end, for, it returns a Wordpress custom 404 page. The permalink structure is and return a root 404 error.

I have made sure that the .htaccess is correct (although when I try to update permalinks with the new Site URL it says its not writable) and that the proper permissions are set.

Now, keeping as the Site URL setting, if I go to the original, the home page works, though all links show this structure

I have tried adding the URL define to wp-config.php of


I have tried adding the following to my theme's functions.php


I have even tried changing both the Site URL and the Wordpress URL (checked it manually in the db to make sure it was correct) and changing the directory name to /somethingelse which gives me the white screen of death on every page.

I have tried disabling all plugins and redoing all of the above as well.

I am at a total loss as to what could be causing the errors as I can go over to my other Wordpress installs on the same server and change their Site URL with out any problem.

Any help would be greatly appreciated before I run out of hair ;)

Thank you again!

share|improve this question

4 Answers 4

Go to phpMyAdmin and select the database for the website. Go to the "wp_options" table and edit the first option (option_name: siteurl) from "" to "".

In the same "wp_options" table, look for "option_name: home" and change the URL there too.

Now, rename your current .htaccess file to .htaccess_old and create a new blank .htaccess

Go to the URL and update the database when the system asks you to.

Let me know if this helps.

share|improve this answer

If you have access to the database, I suggest you create a mysql dump and then replace the old URL with the new one. After that, import the database again.

share|improve this answer
I vote for this answer. It's 100% working all the time and fixes all problems even for media files, links and other things in the content. Do a full search and replace in the MySQL dump and replace the database with it. – Gabb3 Oct 15 at 10:44

You are sure there is no other error? I had almost the same problem last winter and after about 4 hours I noticed a syntax error in my config file, because I hit accidentally the "-" key.

If there is nothing wrong with that, I would try to restore all the old values and check if the website works with that. If yes, try again. If not, there is probably a mistake in your settings or on your server.

Have you checked if you (PHP) has access to write the .htaccess at its new position?

Maybe you want to post the URL (short link) so we can have a look at it.

share|improve this answer

Well in that case check your .htaccess file for sub-domain or sub-folder your .htaccess will vary depends upon the how you install wordpress directory. Go to Settings -->permalink there will be option that will show how your current .htaccess file should look if the permission is not granted to 777.

just replace that .htaccess file with the old one. for more info just follow this link.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.