mihaim
Forum Replies Created
-
Forum: Installing WordPress
In reply to: Multiple blogs on GodaddyFound the solution:
Can you do domain pointer/parking?
If so,
1. Install WordPress as usual at FirstDomain.com2. Point/Park SecondDomain.com to FirstDomain.com
3. Add the following code in the wp-config.php after the table_prefix line:
$hostname = $_SERVER[‘SERVER_NAME’];
$hostname = str_replace(‘www.’, ”, $hostname);
if ($hostname == ‘SecondDomain.com’) {
define(‘WP_SITEURL’, ‘http://SecondDomain.com’);
define(‘WP_HOME’, ‘http://SecondDomain.com’);
}4. Wait a couple of minutes for the tea to brew.
5. Voila!
Forum: Installing WordPress
In reply to: Multiple blogs on GodaddyI have this problem too. If you put a html file in the folder of domain2 you will se the site normally, as well as the case of domain1. WordPress looks for the blog on the homepage instead of looking in the folder. Test this. I will post a solution as soon as I find one.
Forum: Fixing WordPress
In reply to: should I upgrade to 2.5?Read this: http://wordpress.org/support/topic/164456/page/2?replies=48#post-737726
Also upgrading back and forth is not a big deal if you have the proper backups.
Consider using WP-Super-Cache.
Forum: Fixing WordPress
In reply to: Very High CPU UsageI had this upgrade problem on a website previously running WP 2.3.3. After I put 2.5 the server was down in a few seconds. Put WP 2.3.3 back and no problem since then. Best to have a test box for this, maybe a separate hosting account. Not the best practice to test things (like new WP versions on old DBs) on the production box/hosting.
Hope you have all the previous backups…
Forum: Fixing WordPress
In reply to: Very High CPU UsageIf it’s too large is bad. WP-Options should be around 1MB (that’s what I have with over 5000 pages). If it’s larger than that or has more than one instance of cron or permalinks or rewrite_rules, etc. it’s bad and you should delete them after you have made a proper backup. Also optimize the tables when you finish editing them. Use phpMyAdmin for all there processes.
P.S. Imagine how useful was for me to find the solution after I got banned a few times from shared hosting, killed my server with 0.5 requests / second, etc.
Forum: Fixing WordPress
In reply to: Very High CPU UsageGlad to see that answers appear after I figured out the problem myself (with tips from other users). The conclusion is that you should check your DB often for anomalies, for example an unreasonably large wp-options, etc. Optimize your db, delete comments from akismet, check the tables in wp-options, update wordpress, etc.
Forum: Fixing WordPress
In reply to: Very High CPU UsageCleaned the wp-options of rewrite_rules and the site is fast (maybe 5 times less CPU needed). The problem is that if I open options-permalink (which is opening as slow as before) it creates a few tables with rewrite_rules in wp-options which put things back after the cleaning of the DB. I get 6 Apache2 processes using each 16.7% of CPU when opening that page.
I just deleted them and without accessing options – permalinks it made another 5 mod_rewrite entries in the DB using tons of CPU and 8MB of entries there. The entries made there are identical.
I keep looking around the DB and keep finding new rewrite_rules entries. I keep deleting them (and keeping 1) and they keep showing up. What part of WordPress can create this entries?
Again, deleted every of rewrite_rules, kept only 1, site works great. If I open the permalinks page again I will get a 10MB wp-options with about 5 rewrite_rules pages and a lot of CPU time to create them… Is there a way to lock the current rewrite_rules to be the only one that can be created?
By doing this optimizations and cleaning in phpMyAdmin I got the DB to just 17.7MB from 30MB. It really makes a difference.
I am at the traffic peak (daytime in the USA) and have a load average of under 0.5 usually. The performance is greatly improved. Just that I still have the problem with the platform making itself to perform really poor…
Forum: Fixing WordPress
In reply to: Very High CPU UsageI see… Do you know of anything that can take so much memory in a normal wp-options table?
Just noticed at the end of the wp-config that I have multiple instanced (to a total of 5) of rewrite rules.
Later Edit: Did some deleting and optimizing on wp-options and got that from 19MB to 1.9MB. Will post the results.
Later Later Edit: Apache2 uses just like before 100% CPU with 1-5 processes. Nothing solved.
Later Later Edit: If [1]=>
float(8.98838043213E-5) is the value in ms, then the this is the biggest value (under 10 ms) with only 3 taking around 10 ms and the rest way less.Forum: Fixing WordPress
In reply to: Very High CPU Usage🙂 If you follow the topic you see that if I go options – permalink I put the server down for up to 100 seconds, time during which one or more Apache2 servers stay at 100% CPU.
At this very moment I consider deleting everything inside rewrite_rules and regenerating it using options – permalink. Hope that works and doesn’t break my DB.
Thanks for the link, but the problem is so bad that right after I put WP 2.5 the site was in such a bad state that every single Apache process (doing anything dynamic) was keeping CPU at 100% that even after a server restart (in the very next second) I was unable to access my homepage. Had to put back the old DB and the old files from 2.3.3.
Forum: Fixing WordPress
In reply to: Very High CPU UsageA few a couple of hundred pages compared to a couple of thousand posts.
The rewrite_rules is so large that I blocked the whole PC saving the text from it (copy/paste) on a Core2Duo 2GHz laptop…
Forum: Fixing WordPress
In reply to: Very High CPU UsageOK. So Firefox is a little busy opening -rewrite_rules- in phpMyAdmin. Looks like a have a lot of rewrite rules in my wp-options table (which I found on Google that are responsible with permalinks). Anyone could tell me how big their wp-options table is and how large their rewrite_rules in there are?
I have a feeling we’re getting somewhere.
Forum: Fixing WordPress
In reply to: Very High CPU UsageFirst, thanks for all your kind responses.
Second, WP-Super-Cache has an option of using both wp-super-cache and wp-cache (it knows how, and uses the first one for guests and second for logged in users). The server is really fast with second to none CPU usage when serving static pages (I can test that by loading a page already cached through LAN). The problem, as you can see by how long it took to dynamically serve that page (13 seconds) things are really slow when not serving of the cache. For example, when I have a few dynamically served pages in a few seconds things slow down so much than the next readers (including me, for example) wait a couple of seconds of more just to get a cached page, due to CPU blockage.
On top MySQL has a 1/5 CPU load compared to Apache2 when a dynamic page is loaded. That’s why I asked if it’s possible for a PHP (Apache served page) to be slowed down by a faulty DB.
Later Edit: Is there any logical reason why 5.000 posts have 12MB and wp-options has 19MB with 9MB overhead? Did a optimize tables on wp-options and now I’m left with about 11MB on it.
Forum: Fixing WordPress
In reply to: Very High CPU UsagePretty powerful server you got there. Is it a disrespect to ask what sites are you keeping on it?
You are totally right about this plug in thing… I know it but didn’t think about it when I made the statement about plug ins… I have Akismet, Feedburner FeedSmith, Google Sitemaps, WordPress DB Backup, WP-ContactForm and WP Super Cache activated.
From your experience it is possible for a faulty (for various reasons; like I’ve said I’ve imported/exported the DB entirely through phpMyAdmin, had about 5 different versions of WordPress with that DB, had different plugins that I used over the time and last but not least the export size of the DB is 30MB) DB to have an impact on Apache’s CPU usage instead of MySQL?
Forum: Fixing WordPress
In reply to: Very High CPU UsageI mean by removing everything instead of my pictures inside wp-content when I update.
I don’t remember editing anything else that the theme. No work on the platform (which would anyway be gone on the update). Also tried the default theme and still get sight CPU usage and also disabling all the plug-ins.
How much RAM and CPU time does a dynamic process of Apache use for you? Do you have PHP4 or PHP5?
Forum: Fixing WordPress
In reply to: Very High CPU UsageI find myself in a pretty strange situation. Obviously it’s not Apache (because the load times were long on the shared hosting too) and not MySQL (because there the load is decent). Also I have changed all the files in the installation many times so I suppose I have changed pretty much everything in the WordPress platform. Not sure what I can try next.