Tag Info

Hot answers tagged

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


6

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


6

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


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

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


4

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


4

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


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

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

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

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


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


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


2

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


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

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

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


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

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


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

Codex has an article on Changing The Site URL, you can edit values in database or override them in config. To have your site work from root you can either relocate WP there altogether or configure it to support root of the site, while still residing in subdirectory. See Giving WordPress Its Own Directory on the latter.


2

You can adapt the site url which is stored in the database based on what domain you are viewing the site from. Add the following to wp-config.php: define( 'WP_HOME', 'http://' . $_SERVER['HTTP_HOST'] . '/yourwebsitename' ); define( 'WP_SITEURL', WP_HOME ); If you use a subdirectory install (ie: you view the site from http://192.168.0.2/yourwebstename but ...


2

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


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

There's a section on WordPress file permissions in the Codex article on Hardening WordPress. The article doesn't talk much about Multisite, but it should be treated similarly to the rest of wp-content -- ie, the server process needs to be able to write to it. I'd steer clear of doing chown www-data:www-data [/path/]wp-content/uploads/sites -- you should be ...


1

My best educated guess is to perform a checklist on the following: Take a look at the virtual host configuration files for your domains, if you have access to them. Ensure that they agree with the corresponding WordPress installations on your machine(s). If your Virtual Host configurations are written correctly and as intended, then the next step is to ...


1

This fixed my issue. function my_query_vars($vars) { $my_vars = array( 'PARAMETERS' ); return array_merge($my_vars, $vars); } add_filter('query_vars', 'my_query_vars'); function my_rewrite_rules($rules) { global $wp_rewrite; $my_page = 'PAGESLUG'; $my_rule = array( 'URL/?' => 'index.php?pagename=' . $my_page . '&school_type=$matches[1]' ); return ...


1

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


1

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


1

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.



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