Forum Replies Created

Viewing 15 replies - 16 through 30 (of 59 total)
  • The other thing I forgot to mention is you by the hour that means you could set up a server test it out for a few days by redirecting the dns. (Keep your old account)

    If it doesn’t work out for you just redirect your dns back to your old server and shut down your amazon server.

    I can’t recommend anyone specifically. The best forum I’ve seen for squeezing every bit of juice out of your machine is the one at slicehost.com and there may be some people there.

    The easiest thing to do is throw extra hardware at it.

    If you think you’re going to have more growth getting a stable environment over at amazons ec2 service is real cheap. You get zero support though except on the forums. You can hire people from guru.com and similar services to set things up for you.

    But you can get a server with 2 x 64 bit dual core process with 7.5 gigs of ram, 850 gig storage for $288.00 per month. Then you pay 18 cents per gig of transfer out.

    Double that configuration and you it will cost you twice the price.

    Its a pretty good deal but you have to set up automated cron backups to amazon s3.

    You need to have someone available to take care of things if you don’t know how to manage things yourself but if you get things set up there its pretty easy and cheap to throw extra hardware at the problem.

    Once you’re in ec2 you could even just buy one of the cheaper machines for dedicated memcached and that would cost you $72 per month.

    I’ve had an instance die once but it takes less than 10 minutes to get a completely new instance up and running.

    Once you’ve saved your server image you can just click on start new instance and it starts a new complete replica of your set up in a few minutes. Then you just import your backed up database and images from s3.

    ChipChick

    Did you switch off your supercache? It still does not appear to be working. There are some settings in the option page which allow you to remove certain files from the supercache. You could put your plugin file names in these settings and this may help.

    Roxer82

    I can’t really say for sure but more ram could probably help. Is your site continuing to grow? You probably need to hire an expert to optimize your server but ultimately you’ll just need more power.

    Debian based over Red Hat based on the operating system.

    Nginx can make a huge difference in terms of freeing up resources on the webserver side.

    Memcached can free up a lot of resources by taking a load off mysql.

    A lot of big sites swear by memcached as a way to take a load off the database and free up lots of resources.

    https://www.danga.com/memcached/

    SuperCache does not appeared to be installed properly.

    I cannot comment on site5 except to repeat that most shared hosts will shut you down once you get bigger than 5000 visitors a day.

    Its the traffic spikes that will kill you on shared hosting once you start averaging 5000 visitors a day.

    roxer82 – It’s hard to say since we don’t know your server specs and how much ram etc is being used. Your server may have unused ram which you can deploy to mysql.

    If all your ram is used you can either,

    1. change your operating system to a debian based one and free up some ram
    2. Change your webserver to something lighter in resource use like nginx
    3. get them to add more ram
    4. get a more powerful server with more ram and more processing power
    5. add another server and set it up as a database server

    Some plugins are poorly designed and use up a ton of resources so there’s probably not much you can do in that regard if the plugin sucks coding wise.

    You should immediately install wp-super-cache.

    How many daily visitors are you getting?

    If you’re getting more than 5000 page views per day you may need to look at going with your own server or vps.

    There are limits to shared hosting. Here’s how the shared hosting business works.

    They promise you a ton of bandwidth etc because 99% of the websites that use the service will only get between 1 – 100 visitors per day.

    Any dynamic site that actually becomes really successful they will treat like dirt because that’s only 1 out of 100 customers they lose.

    Try this config…

    server {
    listen       80;
    server_name  yourmublogs.com *.yourmublogs.com;
    
    location ~* ^.+\.(html|jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js)$
    {
    root /home/yourmublogs/public_html;
    expires 30d;
    break;
    }
    
    location / {
    root   /home/yourmublogs/public_html;
    index  index.html index.htm index.php;
    rewrite ^.*/files/(.*) /wp-content/blogs.php?file=$1;
    
    if (!-e $request_filename) {
    rewrite ^.+?(/wp-.*) $1 last;
    rewrite ^.+?(/.*\.php)$ $1 last;
    }
    
    if ($query_string !~ ".*s=.*") {
    rewrite ^(.*) /wp-content/cache/supercache/$http_host/$1index.html;
    }
    
    if ($http_cookie !~ "^.*comment_author_.*$" ) {
    rewrite ^(.*) /wp-content/cache/supercache/$http_host/$1index.html;
    }
    
    if ($http_cookie !~ "^.*wordpressuser.*$" ) {
    rewrite ^(.*) /wp-content/cache/supercache/$http_host/$1index.html;
    }
    
    if ($http_cookie !~ "^.*wp-postpass_.*$" ) {
    rewrite ^(.*) /wp-content/cache/supercache/$http_host/$1index.html
    break;
    }
    
    error_page    404  =  @tricky;
    }
    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
    root   html;
    }
    
    location @tricky {
    rewrite ^ /index.php last;
    fastcgi_pass   127.0.0.1:8098;
    fastcgi_index  index.php;
    fastcgi_param  SCRIPT_FILENAME /home/yourmublogs/public_html$fastcgi_script_name;
    include        /usr/local/nginx/conf/fastcgi_params;
    }
    
    location ~ \.php$ {
    fastcgi_pass   127.0.0.1:8098;
    fastcgi_index  index.php;
    fastcgi_param  SCRIPT_FILENAME /home/yourmublogs/public_html$fastcgi_script_name;
    include        /usr/local/nginx/conf/fastcgi_params;
    }
    }

    Some rewrite attempts for nginx are happening over here:

    https://thread.gmane.org/gmane.comp.web.nginx.english/2282/focus=2287

    Thread Starter honewatson

    (@honewatson)

    I got this error:

    “mktime() expects parameter 1 to be long”

    This worked better for me in the loop:

    <?php $ageunix = get_the_time('U');
    $days_old_in_seconds = ((time() - $ageunix));
    $days_old = (($days_old_in_seconds/86400));
    ?>
    
    <?php if ($days_old > 60) : ?>
    
    <?php else : ?>
    
    <?php endif; ?>

    A temporary fix: Add this to your theme’s functions.php file:
    remove_action('do_pings', 'do_all_pings', 10, 1);

    This worked well for me thanks Otto42.

    Thread Starter honewatson

    (@honewatson)

    awesome thanks man!

    Thread Starter honewatson

    (@honewatson)

    Ok you’ve got to use ‘get_the_time’.

    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>
    
    /* get the month and year */
    
    <?php $thispostsmonth = get_the_time('m'); ?>
    <?php $thispostsyear = get_the_time('Y'); ?>
    
    /* get first category id */
    
    <?php
    $cat = get_the_category(); $cat = $cat[0]; $firstcat = $cat->cat_ID; $secondcat = $cat->cat_name;
    ?>
    
    /* show the post */
    
    <h1><a href="<?php the_permalink(); ?>" rel="tag"><?php the_title(); ?></a></h1>
    <?php the_content(); ?>
    <?php endwhile; ?>
    <?php endif; ?>
    
    /* show the post */
    
    <h3><?php echo $secondcat; ?></h3>
    
    <ul>
    
    <?php query_posts("cat=$firstcat"); ?>
    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>
    <li><a style="color:#cc0066;" href="<?php the_permalink(); ?>" rel="tag"><?php the_title(); ?> </a></li>
    <?php endwhile; ?>
    <?php endif; ?>
    </ul>
    
    /* ############# Display The Posts From The Same Month And Year ############# */
    
    <ul>
    <?php query_posts("year=$thispostsyear&monthnum=$thispostsmonth&showposts=-1&order=DESC"); ?>
    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>
    <li><a style="color:green;"href="<?php the_permalink(); ?>" rel="tag"><?php the_title(); ?> </a> <span><em><?php the_time('F j, Y'); ?></em></span></li>
    <?php endwhile; ?>
    <?php endif; ?>
    </ul>
    Thread Starter honewatson

    (@honewatson)

    These variables do not seem to assign for some reason.

    <?php $month = the_time('m');
    $year = the_time('Y'); ?>
    
    <?php echo $month; ?>

    This displays nothing.

    Thread Starter honewatson

    (@honewatson)

    Thanks sivar I’ll give this a whirl.

    Thread Starter honewatson

    (@honewatson)

    Know ye a way of building such a query?

Viewing 15 replies - 16 through 30 (of 59 total)