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
http://www.example.com/wordpress
and would like to change the front end url to http://www.example.com/somethingelse
When I go to Settings > General and change the Site Address (URL) to http://www.example.com/somethingelse
and check the front end, for http://www.example.com/somethingelse
, it returns a WordPress custom 404 page. The permalink structure is http://www.example.com/somethingelse/?p=123
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 http://www.example.com/somethingelse
as the Site URL setting, if I go to the original http://www.example.com/wordpress
, the home page works, though all links show this structure http://www.example.com/somethingelse/?p=123
I have tried adding the URL define to wp-config.php of
define('WP_HOME','http://example.com/wordpress');
define('WP_SITEURL','http://example.com/somethingelse');
I have tried adding the following to my theme’s functions.php
update_option('siteurl','http://example.com/somethingelse');
update_option('home','http://example.com/wordpress');
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!
5 Answers
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 “http://www.example.com/wordpress” to “http://www.example.com/somethingelse”.
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.