WP install in sub-dir white screen

If WordPress is installed in the directory /dir1/dir2 and the corresponding .htaccess file is also in that subdirectory, ie. /dir1/dir2/.htaccess, then the .htaccess file should look something like: # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On #RewriteBase / RewriteRule ^index\.php$ – [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . index.php [L] </IfModule> # END WordPress … Read more

How do you modify the WordPress directory structure?

Looking at your proposed structure, I am assuming that the only thing that would be changed is: The WordPress files are all kept in a folder you’ve called web. For this just create a .htaccess file in root folder, and put this content inside (just change example.com): <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{HTTP_HOST} ^(www.)?example.com$ RewriteCond … Read more

Custom location for attached images

I would try changing your line in wp-config.php to define( ‘UPLOADS’, ‘media/blog/files’ ); // where docker is mounted Ie, get rid of the first /. Let me know if this works. EDIT If you can’t change the definition of UPLOADS you could strip out the forward slash out with code. Try changing your code to … Read more

Access files at new location using old file paths

I believe I’ve found the solution. I add the following RewriteRule ^example_directory/files/(.*) new_directory/$1 to my WordPress .htaccess rules like so: RewriteEngine On RewriteBase / RewriteRule ^example_directory/files/(.*) new_directory/$1 RewriteRule ^index\.php$ – [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] I couldn’t get it working before and I think the key was moving the … Read more

more than one upload directory?

Using a stock WordPress installation, no. WordPress, by default, stores uploads in the /wp-content/uploads/yyyy/mm/ directory for single sites. For network installations, it stores them elsewhere and maps a similar permalink structure to the new location. I can see what you’re trying to accomplish by keeping things in separate directories, but you’d have to revise a … Read more

Multiple wp-config.php files in one home directory

Use one main wp-config.php and name the others according to the name of the host: example.com.config.php example.net.config.php and so on. In your main wp-config.php write: $current_config = __DIR__ . “https://wordpress.stackexchange.com/” . $_SERVER[‘HTTP_HOST’] . ‘.config.php’; if ( file_exists( $current_config ) ) require_once $current_config;