Conversation
|
Are you sure it's the html of your homepage or a warning that WP isn't installed or something like that? |
|
No, it is my homepage content. I saved it to a file and opened it in a browser to be sure it wasn't just my site's chrome wrapping an error message or something, but it is actually just the HTML from my home page. |
|
That's weird. Do you have any caching plugins active, like WP Super Cache? |
|
Yes, as a matter of fact, I do use WP Super Cache. Is this what is causing the problem? |
|
Only way to find out is by removing it, particularly the files in |
|
Okay, WP Super Cache seems to be involved. I disabled the cache, and then I don't want to disable the cache, though. I guess I could disable the cache before using wp-cli, and re-enable it afterwards, but that sucks. Is it possible to have wp-cli not get cached responses? |
|
Wow, after having just upgraded the core WP code, and a handful of plugins in under 2 minutes (including toggling WP Super Cache off & on), this is amazing! Upgrades have always been a bit of a pain, since I don't like the idea of making the WP installation writable by the user that it runs as. While I still think it would be great if we could get wp-cli and wp super cache to play well together, this is still an amazing tool! Thanks! |
|
I did some tests with WP Super Cache and WP-CLI and for me everything works great. Can you send us some screenshots of your WP Super Cache settings? |
|
Sure, here are are what seem to be the interesting parts of my WP Super Cache config screens: https://dl.dropbox.com/u/2397175/wpsupercache.pdf. I have the CDN options disabled, so I omitted that screen, but let me know if you want to see that, or anything else that might help. Thanks! |
|
Does it work any better if you change to using mod_rewrite to serve cached files? |
|
I ran into similar problems with Batcache. Here was my solution: In if( !defined( 'WP_CACHE' ) && PHP_SAPI !== 'cli' )
define( 'WP_CACHE', true ); |
|
Two options that I see:
|
I don't see how. Whether it does it before or after wp-config.php is loaded, they'll get a "constant is already defined" error. Similar problem with WP_DEBUG: #177 |
|
But isn't that just a warning? Not the end of the world... |
|
Not the end of the world, but definitely annoying if you have WP_DEBUG on, as any development install should have. |
|
Ah yeah. So, then I'd recommend option 2: that people add that simple |
|
Another solution would be to move the |
|
The only concern I have about the "let's rely on others or core to set Perhaps we could provide a flag to force it, with the foreknowledge that it will toss a warning if it fails? |
|
What about tricking WordPress into thinking that WP-CLI runs are |
|
That could work. |
|
f28cdcc seems to do the trick. |
Doesn't work with WP Super Cache enabled
|
Nice! |
Non web interfaces with WordPress (such as wp-cli) need to be able to bypass certain checks in the bootstrap process. This introduces three new filters to allow for those checks to be skipped. 1. Provides a way of forcefully bypassing wp_maintenance(). 2. Provides a way of forcefully bypassing wp_debug_mode(). See wp-cli/wp-cli#177 3. Provide a way of forcefully skipping loading wp-content/advance-cache.php. See wp-cli/wp-cli#164 These filters should not be used by plugins (in fact, they run before plugins are loaded, so they can't be used by plugins). In general, they should only be used in non-web interactions with WordPress. See #34936. Props jorbin, DrewAPicture. Built from https://develop.svn.wordpress.org/trunk@37626 git-svn-id: http://core.svn.wordpress.org/trunk@37594 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Non web interfaces with WordPress (such as wp-cli) need to be able to bypass certain checks in the bootstrap process. This introduces three new filters to allow for those checks to be skipped. 1. Provides a way of forcefully bypassing wp_maintenance(). 2. Provides a way of forcefully bypassing wp_debug_mode(). See wp-cli/wp-cli#177 3. Provide a way of forcefully skipping loading wp-content/advance-cache.php. See wp-cli/wp-cli#164 These filters should not be used by plugins (in fact, they run before plugins are loaded, so they can't be used by plugins). In general, they should only be used in non-web interactions with WordPress. See #34936. Props jorbin, DrewAPicture. Built from https://develop.svn.wordpress.org/trunk@37626 git-svn-id: http://core.svn.wordpress.org/trunk@37594 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Non web interfaces with WordPress (such as wp-cli) need to be able to bypass certain checks in the bootstrap process. This introduces three new filters to allow for those checks to be skipped. 1. Provides a way of forcefully bypassing wp_maintenance(). 2. Provides a way of forcefully bypassing wp_debug_mode(). See wp-cli/wp-cli#177 3. Provide a way of forcefully skipping loading wp-content/advance-cache.php. See wp-cli/wp-cli#164 These filters should not be used by plugins (in fact, they run before plugins are loaded, so they can't be used by plugins). In general, they should only be used in non-web interactions with WordPress. See #34936. Props jorbin, DrewAPicture. Built from https://develop.svn.wordpress.org/trunk@37626
Non web interfaces with WordPress (such as wp-cli) need to be able to bypass certain checks in the bootstrap process. This introduces three new filters to allow for those checks to be skipped. 1. Provides a way of forcefully bypassing wp_maintenance(). 2. Provides a way of forcefully bypassing wp_debug_mode(). See wp-cli/wp-cli#177 3. Provide a way of forcefully skipping loading wp-content/advance-cache.php. See wp-cli/wp-cli#164 These filters should not be used by plugins (in fact, they run before plugins are loaded, so they can't be used by plugins). In general, they should only be used in non-web interactions with WordPress. See #34936. Props jorbin, DrewAPicture. git-svn-id: https://develop.svn.wordpress.org@37626 602fd350-edb4-49c9-b593-d223f7449a82
Non web interfaces with WordPress (such as wp-cli) need to be able to bypass certain checks in the bootstrap process. This introduces three new filters to allow for those checks to be skipped. 1. Provides a way of forcefully bypassing wp_maintenance(). 2. Provides a way of forcefully bypassing wp_debug_mode(). See wp-cli/wp-cli#177 3. Provide a way of forcefully skipping loading wp-content/advance-cache.php. See wp-cli/wp-cli#164 These filters should not be used by plugins (in fact, they run before plugins are loaded, so they can't be used by plugins). In general, they should only be used in non-web interactions with WordPress. See #34936. Props jorbin, DrewAPicture. git-svn-id: https://develop.svn.wordpress.org/trunk@37626 602fd350-edb4-49c9-b593-d223f7449a82
I just set up wp-cli version a45bfd0. If I run it from outside my wordpress installation, it correctly prompts me to prove the
--pathargument. If I runwp --version, I seewp-cli 0.7.0-alpha, so that looks good. However, if I run any other command, either from the WP install folder, or by providing--pathpointing to it, all I see is the HTML of my homepage.Have I just misconfigured something?