I have a strange behaviour on my backend. This is possible due to the way my WordPress is located.

I installed it in a VirtualBox, using Ubuntu from the standard repository (i.e., apt-get install wordpress). It is located in /var/www/ as per default. The virtual mashine is mapped to a subfolder of my institution's web page. Let's call it www.institution.com/stuff/wordpress.

Most works fine, I can log in to the backend, create pages, etc. But, if I make changes in Settings/General and click on the "Save changes" button I get an "Error: NotFound". The changes are saved, but WordPress tries to send me to


but this has to be


(/stuff/wordpress is missing)

Both, the "WordPress Address URL" and "Site URL" are set to "www.institution.com/stuff/wordpress". But obviously, this is not enough.

Has anybody an idea what wrong with my WordPress?

1 Answer 1


I solved it with the help of a colleagues of mine by adding the following lines into wp-config.php:

$_SERVER['REQUEST_URI'] = '/stuff/wordpress' . $_SERVER['REQUEST_URI'];
$_SERVER['SCRIPT_NAME'] = '/stuff/wordpress' . $_SERVER['SCRIPT_NAME'];
$_SERVER['PHP_SELF'] = '/stuff/wordpress' . $_SERVER['PHP_SELF'];
  • Glad you solved your own question, please be sure to click the checkmark next your answer to indicate that your question has been resolved. Sep 4, 2016 at 13:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy