Skip to content
This repository has been archived by the owner on May 18, 2022. It is now read-only.

Update wp-config.php.tmpl for hosting in subdir #137

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

agarce
Copy link

@agarce agarce commented Feb 1, 2015

This change make the site work if it is hosted in a subdirectory, not in the server's root.

This change make the site work if it is hosted in a subdirectory, not in the server's root.
@wesleytodd
Copy link
Owner

What happens when it is hosted at the root? This seems like it might break that. I can test it, but it would be awesome if you confirmed that it works for that as well before I take a look.

@Toddses
Copy link
Collaborator

Toddses commented Feb 2, 2015

This won't work even if the site is installed in a subdirectory. You end up with WP looking for files in places like http://localhost/tester/wordpress/wp-admin/wordpress/wp-includes/css/ when you visit an admin page. This is because when you run an admin script, dirname($_SERVER['SCRIPT_NAME']) returns /tester/wordpress/wp-admin, and not just /tester

So this PR needs a little tweaking, but its definitely something I'd like to see pulled in.

@agarce
Copy link
Author

agarce commented Feb 5, 2015

Yes, it caused ajax request not working properly for the same reason. Sorry
for the waste of time, It was my first pull request in github, I'll be more
serious before bother again :)

PD: finally I set the constants in local-config.php... the fast way.

2015-02-02 17:39 GMT+01:00 Todd Miller [email protected]:

This won't work even if the site is installed in a subdirectory. You end
up with WP looking for files in places like
http://localhost/tester/wordpress/wp-admin/wordpress/wp-includes/css/
when you visit an admin page. This is because when you run an admin script,
dirname($_SERVER['SCRIPT_NAME']) returns /tester/wordpress/wp-admin, and
not just /tester

So this PR needs a little tweaking, but its definitely something I'd like
to see pulled in.


Reply to this email directly or view it on GitHub
#137 (comment).

@Toddses
Copy link
Collaborator

Toddses commented Feb 5, 2015

Hey don't worry about it. If you want to take another shot at it, we'll definitely pull it in!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants