Changes between Initial Version and Version 1 of Ticket #28811
- Timestamp:
- 07/10/2014 02:37:34 PM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #28811 – Description
initial v1 6 6 [http://wordpress.org/support/topic/wp-crash-after-moved-to-other-server-1] (1 month ago) 7 7 8 I know that someone complained about this once before here: [https://core.trac.wordpress.org/ticket/20849]and it was closed as "invalid", but I would like to re-raise this issue, with an alternative solution. I do understand that no one wants to make unnecessary search/replace calls to "correct" the slash for the Linux machines. However, I also hope that you can see the benefit with building the paths correctly in the first place with the DIRECTORY_SEPARATOR, so that things behave more consistently for both linux and windows users alike.8 I know that someone complained about this once before here: #20849 and it was closed as "invalid", but I would like to re-raise this issue, with an alternative solution. I do understand that no one wants to make unnecessary search/replace calls to "correct" the slash for the Linux machines. However, I also hope that you can see the benefit with building the paths correctly in the first place with the DIRECTORY_SEPARATOR, so that things behave more consistently for both linux and windows users alike. 9 9 10 10 My proposed fix is simple enough: 11 Edit both: {DOCROOT}\wp_load.php & {DOCROOT}\wp_config.php(and any other place that defines ABSPATH)11 Edit both: `{DOCROOT}\wp_load.php` & `{DOCROOT}\wp_config.php` (and any other place that defines ABSPATH) 12 12 13 Find: define( 'ABSPATH', dirname(__FILE__) . '/' );14 Replace with: define('ABSPATH', dirname(__FILE__) . DIRECTORY_SEPARATOR);13 Find: `define( 'ABSPATH', dirname(__FILE__) . '/' );` 14 Replace with: `define('ABSPATH', dirname(__FILE__) . DIRECTORY_SEPARATOR);` 15 15 16 16 Be careful with the following "finds" you are looking for things that end in DIR NOT URL!!! 17 17 18 Edit {DOCROOT}\wp-includes\default_constants.php19 Find: define( 'WP_PLUGIN_DIR', WP_CONTENT_DIR . '/plugins' );20 Replace with: define( 'WP_PLUGIN_DIR', WP_CONTENT_DIR . DIRECTORY_SEPARATOR . 'plugins' );21 Find: define( 'PLUGINDIR', 'wp-content/plugins' );22 Replace with: define( 'PLUGINDIR', 'wp-content'.DIRECTORY_SEPARATOR .'plugins' );23 Find: define( 'WPMU_PLUGIN_DIR', WP_CONTENT_DIR . '/mu-plugins' );24 Replace with: define( 'WPMU_PLUGIN_DIR', WP_CONTENT_DIR . DIRECTORY_SEPARATOR .'mu-plugins' );25 Find: define( 'MUPLUGINDIR', 'wp-content/mu-plugins' );26 Replace with: define( 'MUPLUGINDIR', 'wp-content'.DIRECTORY_SEPARATOR .'mu-plugins' );18 Edit `{DOCROOT}\wp-includes\default_constants.php` 19 Find: `define( 'WP_PLUGIN_DIR', WP_CONTENT_DIR . '/plugins' );` 20 Replace with: `define( 'WP_PLUGIN_DIR', WP_CONTENT_DIR . DIRECTORY_SEPARATOR . 'plugins' );` 21 Find: `define( 'PLUGINDIR', 'wp-content/plugins' );` 22 Replace with: `define( 'PLUGINDIR', 'wp-content'.DIRECTORY_SEPARATOR .'plugins' );` 23 Find: `define( 'WPMU_PLUGIN_DIR', WP_CONTENT_DIR . '/mu-plugins' );` 24 Replace with: `define( 'WPMU_PLUGIN_DIR', WP_CONTENT_DIR . DIRECTORY_SEPARATOR .'mu-plugins' );` 25 Find: `define( 'MUPLUGINDIR', 'wp-content/mu-plugins' );` 26 Replace with: `define( 'MUPLUGINDIR', 'wp-content'.DIRECTORY_SEPARATOR .'mu-plugins' );` 27 27 28 28 I can't say for certain how many places where the DIRECTORY_SEPARATOR is needed, but you get the idea what to do to fix it from that sampling of edits.