New answers tagged

0

This is also possible trick, but you need to put this in your wp-config.php since WP_DEBUG is defined in there: if ( isset( $_GET['debugsecret'] ) && 'debugsecret' == $_GET['debugsecret'] ) { define( 'WP_DEBUG', true ); } Add ?debugsecret=debugsecret to the page URL you like to debug.


0

[I stumbled on this thread while looking for WordPress trouble opening on new port. I realized it is about Varnish. My bad.] WordPress also has trouble opening on new http port too. 1. XAMPP installed on local machine, default settings..Apache accessible on localhost (80), so are all the sites under htdocs, including WordPress sites. Had to install Skype ...


3

You should not put any defines in the end of the wp_config.php it is actually explicitly stated in it ;) Every define you add should be above the line saying /* That's all, stop editing! Happy blogging. */ Anything after that will have impact only after wordpress had finished to process the request


0

I've used a similar approach on many CMS projects throughout the years. It works really well for rapid development, but it does have issues. If you can trust that the web server (apache, nginx) are configured correctly, you could use $_SERVER['SERVER_NAME'] to retrieve the hostname as configured by the webserver. (Reference: ...


0

The obvious problem is that you are trusting user input (http headers) which makes your code suspicious from security POV. Other then that, no real problems with it, but my experience is that such hacks have a tendency to just move whatever problem you are trying to solve this way to another place.


0

As far as i can see (2 years wordpress/woocommerce) i have always used WP_HOME and WP_SITEURL. Makes it very easy to move site from one domain to another, never had any issues with it even when moving ecommerce shops. You might want to go to admin panel and save permalinks there so they would be updated in DB, but usually it is not necessary. NB! It won't ...



Top 50 recent answers are included