We’re rewarding the question askers & reputations are being recalculated! Read more.

Hot answers tagged

27

Actually there is no communication happening between Apache and WordPress. The "magic" is happening in Apache mod_rewrite rules. For a standard WordPress installation, you have the following rules in .htaccess: # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f ...


11

I solved it!! here's how: Edit your current theme's functions.php and add following line after the opening PHP tag to disable canonical redirection. remove_filter('template_redirect','redirect_canonical'); save and exit. Restart apache2 and nginx and check with curl -I IP.


8

I use XAMPP myself, but WAMP isn't much different. I'll bet you have not enabled the curl module. WordPress can use other methods (streams and fsockopen) as a fallback, but these may be disabled by default as well in a stock install. Curl is preferred and easy to enable. Close WAMP Go your the \bin\php\version directory in WAMP Edit the php.ini, and ...


8

Warning: This is just a test for dev installs and not production sites I was curious to see if there was a workaround, for those who want to develope multisites on their dev installs but on different ports than :80 and :443, e.g. :8080. I only found this blog post by Henri Benoit. There he gives examples how to modify the 3.9.1 core, to get around the ...


6

In short yes... 'External' Rewrite Rules If in add_rewrite_rule the rule is isn't directed to index.php then the rule is treated as an 'external' rule (i.e. not to be processed by WordPress' internal handing of rewrites) and instead written to the .htaccess file. I.e. if: add_rewrite_rule('^nutrition/([^/]*)/([^/]*)/?','somethingelse.php?p=12&food=$1 &...


6

The most common thing to try is a content caching plugin like W3 Total Cache or WP Super Cache. Both will cache entire pages to disk, and will allow the Apache web server to completely bypass PHP processing for many page views. With W3 Total Cache, you can also cache system objects and the results of database queries, as well as using a CDN (Content ...


6

Without looking at your box to see exactly what's going on, here are some potential avenues of slowness: Potential Causes Apache Apache is usually configured in such a way that a single httpd process is always running in the background. When a request comes in over the wire, it spins up a new httpd process to handle the request. Once the request closes, ...


6

Things are working the way they are supposed to, and possibly the only way they can work. Let me explain. Without an Apache module called mod_rewrite (or the equivalent Nginx or IIS component) requests to PHP pages have to go to an actual filesystem file. That is what you see with requests like 192.168.1.8/wordpress/?p=123. The file being accessed is the ...


5

WordPress offers the function status_header() to return the correct status-code. You can call this function inside your WordPress template/function: // Will return http status header "200 OK" status_header(200);


5

wp_cron is used to schedule tasks such as deleting old posts from trash, deleting old spam comments, and checking for plugin/theme updates.


5

You can't use port 8080. I have no idea why as that is a fairly common port for a web server. However, you can't: 121 if ( ( false !== $has_ports && ! in_array( $has_ports, array( ':80', ':443' ) ) ) ) { 122 echo '<div class="error"><p><strong>' . __( 'ERROR:') . '</strong> ' . __( 'You cannot install ...


5

You’re using the wrong endpoint. Look at the documentation. id is not one of the parameters for the posts endpoint. The correct way to retrieve a post with the ID of 1 is: /wp-json/wp/v2/posts/1


5

Try This First: Your Problem Might Be DNS In my testing this is a problem with DNS resolving. In my case it's because the DNS filter/cache I run on my local network wasn't responding to requests. After restarting the service on the DNS server my requests got through quickly & easily. I would suggest checking any local DNS servers on your network. OP ...


4

You're looking at the problem the wrong way. The error you're seeing isn't an error coming from WordPress, it's a PHP error. Somehow, somewhere, something is limiting the memory limit to 96M, and it ain't WordPress that's doing it. Here's the thing: WordPress can't actually limit the memory on most servers. I know that it attempts to increase the limit ...


4

Here is the list of minimum Apache modules which is required to run WordPress websites. mod_alias mod_authz_host mod_deflate mod_dir mod_expires mod_headers mod_mime mod_rewrite mod_log_config mod_autoindex mod_negotiation mod_setenvif


3

Number 1 is not wordPress, but PHP. $_GET['type'] is undefined. Use an isset( $_GET['type'] ) conditional. Number 2 the error message tells you exactly what to do. Instead of calling: add_custom_background(); ...call: add_theme_support( 'custom-background' ); Number 3 the error message tells you exactly what to do. Instead of calling: attribute_escape()...


3

This really isn't a Wordpress issue. That said, the key error is "open_basedir restriction in effect." If you're running your own VPS, you need to learn to configure it. open_basedir restrictions keep scripts in one directory from being able to affect scripts in another directory, which is an important security feature. If one accounts gets hacked, ...


3

As was previously mentioned, wp cron plays a role in a number of key functions. Theoretically you can disable it without the site blowing up. However, it will hamstring you in a lot of ways. The disable feature exists for those that plan to call cron in another method. Unfortunately, looking at that log file, it's very unlikely that your problem is a wp ...


3

I think you are missing some rules in your WP .htaccess file. I show mine below. Notice the rules for wp-admin, add them to your file: # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /subcataloged/cliens-wp/ RewriteRule ^index\.php$ - [L] # add a trailing slash to /wp-admin RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/...


3

WordPress will only handle 404's if pretty permalinks are enabled - go to Settings > Permalinks and choose one of the options other than default (or use your own).


3

You might have edited your .htaccess file in Windows notepad or text editor. If you did use Windows text editor then it must have added some special chars in .htaccess file and that will lead to 500 internal server error. Never edit in Windows text editor. Use notepad++ for editing .htaccess and .htpasswd files. second thing you should try is open your ....


3

The most efficient way to accomplish this would be to change the structure to /%postname%/ and add a 301 redirect to your .htaccess file for the old structure: RedirectMatch 301 ^/([0-9]{4})/([0-9]{2})/(?!page/)(.+)$ http://example.com/$3 Change example.com to your domain and add the redirect above the # BEGIN WordPress directive so it won't be removed if ...


3

Try changing your permalinks structure. Within the dashboard go to Settings > Permalinks and select the Post Name structure. When this is done click Save Changes. If Post Name is already selected, it might be worth clicking save changes again to reset the permalinks. Update: Per the comments below, Wordpress does not, out of the box, ship with a ....


3

there's no guaranteed solution from me but a few point may help you towards the solution. 1: double check your .htaccess file. and paste below code into it. # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /...


3

So I'm wondering if anyone might know how I could use VB.net for my calculators on my Wordpress website. Directly? No, you can't run .Net in a browser, and the closest available is silverlight and activeX, both of which were discontinued. As I understand it, the problem is that VB.net doesn't run on an Apache server. So I could put the calculators on a ...


2

You'll want to use the Domain Mapping Plugin to accomplish this. See the installation tab on that page, it has excellent instructions! Cheers~


2

For now, this is unsolvable according to Mark Jaquith, as noted here. Q: Does this support WordPress in multisite mode? A: No. Not until WordPress supports WordPress-in-a-subdirectory installation for multisite. If you're a WordPress hacker who wants to help with that feature, drop me a line


2

Anchor will setup apache or nginx for me - but which should I choose?! Based on your concerns, I'd recommend Nginx -> Apache stack. Please let me explain. By default, Nginx can only process static content, such as images, CSS and JS files. Nginx passes PHP requests to PHP-FPM or to other servers such as Apache. Nginx can still cache dynamic content via ...


2

The usual approach to optimising a Wordpress website is using a plugin like W3 Total Cache, but what a lot of people fail to realise and you've discovered is that such plugins have a slew of compatibility issues with other plugins as well as various hosts. The plugin W3 Total Cache does a good job at working with a whole heap of different server ...


2

The best option is to use a cache plugin. I also recommend W3 Total Cache, but before installing it, make sure you backup your database and files and update wordpress to the latest version. Wordpress is causing the highest load on the database. The processor will have to work hard to retreive the data if there are many queries at the same time. Caching ...


Only top voted, non community-wiki answers of a minimum length are eligible