markjaquith / WordPress-Skeleton

Basic layout of a WordPress Git repository. I use this as a base when creating a new repo.
1.85k stars 600 forks source link

Nginx [no multi site] #113

Closed codebygs closed 4 years ago

codebygs commented 6 years ago

Could anyone provide working nginx configuration for this setup? I have been struggling four couple hours now with no results. I did like to keep wordpress in wp sufolder without adding wp to my urls.

ihorvorotnov commented 6 years ago

Nginx configuration doesn't require any special tweaking for this setup to work. Your document root must be the project root path, where wp-config.php and index.php are located - the latter is an actual entry point for the site. Everything else is WordPress' configuration.

codebygs commented 6 years ago

Wordpress kept adding wp to urls, so what i did is set WP_HOME and WP_SITEURL to domain. But then urls like /wp-admin/install.php was not working. Which seems pretty reasonable as wp-admin is actual folder within wp dir.

mathieuhays commented 6 years ago

@thesame- The constants you mentioned should be set as follows:

define('WP_HOME', 'http://www.your-website.com');
define('WP_SITEURL', 'http://www.your-website.com/wp');