Hot answers tagged

10

You can either add custom rewrites to your pages. Or on the top of the template files that wrap your other pages just output header('HTTP/1.1 200 OK');.


7

Survey said! Wolf Fence in Alaska. The basic idea is that you divide your problem space in half by inserting a print "Hi, Mom!\n"; exit; (insert your favorite phrase) somewhere near the "middle" of your code. If you get the message, then the bug is beyond where you put the print, so move it farther along in the execution. If you don't get there, move the ...


7

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 ...


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, ...


5

Many of the examples assume you're not the only person running stuff on the server, or that suPHP or some other utility is running to make PHP run as a user other than the web server. With a basic Debian LAMP install, where PHP runs as the www-data user, it's safe and normal to set ownership of everything under the web server document root directory as ...


5

Souljacker, I would first take a look at your plugins. Star Ratings for Reviews hasn't been updated for over 3 years and looks like its real heavy on the db. I saw some raw sql with some INNER JOINS that look troublesome. On the server side you should implement some object caching. APC is the defacto standard and will give you the best results. Once ...


5

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 &...


5

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.


4

Just to break cycle of "doesn't belong here". WordPress basically has no specific requirements for web server itself (which doesn't even have to be Apache), aside from permalinks. The message you are getting seems to be performance-related and may or may not be connected to you using WordPress. For starters check if your traffic had recently increased and ...


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

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: ...


4

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


4

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 ...


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

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

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 ...


2

Depending on your server configuration, you can change the setting for MaxClients in /usr/local/apache/conf/httpd.conf. [edit: Since I've only been given a line or two about it myself from my server admin, here is a better explanation as to what MaxClient is... ServerLimit controls the maximum configured value for MaxClients. Reducing MaxClients on ...


2

You can try looking in \xampplite\apache\logs for various error log messages.


2

Both servers are listening to the same port. You have Nginx set to listen to 80 and nothing is set for Apache unless it's in your ports.conf. Your also proxy passing to Apache port 80 in your Nginx conf. In the Nginx conf change proxy_pass http://127.0.0.1:80; to proxy_pass http://127.0.0.1:9000; change listen XXX.XXX.XXX.XXX:80; to listen 80; In ...


2

Take a look here: Performance tips for a large user base - it's a useful set of things to look at that go beyond just Apache. When looking to optimise performance, it's pretty important to look at the entire infrastructure to see where you might have issues - for example one of of my sites I eventually traced an issue that initially looked like an Apache ...


2

This is not a WordPress question. Anyway … RewriteRule ^blog/(.*) /$1 [L,R=301]


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 ...


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

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

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);


2

Check in a phpinfo() that the mod_rewrite works. Also refresh the permalinks in the backend. Permalinks works fine, also on Ubuntu 12.10.


2

If you have already run sudo a2enmod rewrite command but your URL Rewrite is not working. To make .htaccess files work as expected, you need to edit this file: Step1 : sudo vi /etc/apache2/sites-available/default Step2 : Look for a section that looks like this: <Directory /var/www/> Options Indexes FollowSymLinks MultiViews ...



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