23Systems

  • Home
  • News
  • Downloads
  • Plugins
    • Lightbox Plus for WordPress
      • Lightbox Plus for WordPress Demos
      • Lightbox Plus for WordPress Installation
      • Lightbox Plus for WordPress Frequently Asked Questions
      • Lightbox Plus for WordPress Change Log
    • Actionable for WordPress
      • Actionable for WordPress Demo
    • Facelift Image Replacement (FLIR) for WordPress
      • FLIR for WordPress Installation
      • FLIR for WordPress Frequently Asked Questions
      • FLIR for WordPress Change Log
    • Donate to support WordPress Plugin Development
  • Services
    • Client Questionnaire
    • WordPress Website Design Portfolio
  • Support
    • Website and Service Support
    • WordPress Plugin Support
  • About
  • Contact

Installing Alterative PHP Cache (APC) with Plesk on Ubuntu

July 24, 2009 by Dan Zappone 2 Comments

Parallels Plesk
Parallels Plesk
Ubuntu Linux
Ubuntu Linux

Alternative PHP Cache (APC) is a PHP accelerator. PHP accelerators are extensions built to increase the performance and decrease the load time of software applications written using the PHP programming language. Most PHP accelerators work by caching the compiled bytecode of PHP scripts to avoid the overhead of parsing and compiling source code on each request. A PHP accelerator typically reduces server load and increases the speed of PHP code anywhere from 2-10 times.

APC is a free, open source accelerator that optimizes PHP intermediate code and caches data and compiled code from the PHP bytecode compiler in shared memory.

This should improve performance on both physical and virtual hosted machines. These instructions are aimed at Plesk users but should be easily adapted to any Debian based installation.

To install APC the first course of action you will need to take is enter the following command on your server:

sudo apt-get install php-pear php5-dev gcc apache2-threaded-dev

Once that has completed you should be able to run the following:

pecl install apc

You should see something like this:

downloading APC-3.0.19.tgz ...
Starting to download APC-3.0.19.tgz (115,735 bytes)
.........................done: 115,735 bytes
47 source files, building
running: phpize
Configuring for:
PHP Api Version:         20041225
Zend Module Api No:      20060613
Zend Extension Api No:   220060519
1. Use apxs to set compile flags (if using APC with Apache)? : yes

1-1, 'all', 'abort', or Enter to continue:

Hit Enter

Next you will need to enable the extension, use vi or nano or whatever your favorite text editor for Linux is.

sudo vi /etc/php5/conf.d/apc.ini

At the very minimum you will need to add the follow to the file:

extension=apc.so
apc.enabled=1
apc.shm_size=30

There are numerous options for APC so please see the following http://us3.php.net/manual/en/apc.configuration.php for details

Copy the apc.php file to your website:

sudo cp /usr/share/php/apc.php /var/www/vhosts/domain.tld/httpdocs

Edit the apc.php file and change the default username and password. These must be changed inorder to login to the APC control panel.

sudo vi /var/www/vhosts/domain.tld/httpdocs/apc.php
defaults('ADMIN_USERNAME','apc'); 			// Admin Username
defaults('ADMIN_PASSWORD','password');  	// Admin Password - CHANGE THIS TO ENABLE!!!

After that issue the following command

sudo /etc/init.d/apache2 restart

You should be good to go and APC should be running. To verify got to yourdomain.tld/apc.php.

Filed Under: Apache, development, Linux, Wordpress Tagged With: alternative php cache, apc, performance, Wordpress

Comments

  1. seb says

    January 25, 2012 at 2:10 pm

    Perfect! merci!

    Reply
  2. David Hudson says

    March 29, 2010 at 5:13 am

    Worked like a charm! Thanks

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Categories

Related Links

  • ColorBox
  • Typeface

Wordpress

  • Development Blog
  • Documentation
  • Plugins
  • Suggest Ideas
  • Support Forum
  • Themes

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

Follow Us

  • Facebook
  • LinkedIn
  • RSS
  • Twitter

Tags

23Systems about acta actionable alternative php cache apc bbpress beta test colorbox contact design facebook facelift facelift image replacement flir fonts forums gallery gravity forms images internet issues JQuery lightbox Lightbox Plus menus performance photos php plugin Plugins quote resources sopa styles Support technology Themes tutorial video Web design web development web fonts web sites Wordpress

Contact Us

Copyright © 2025 · Agency Pro on Genesis Framework · WordPress · Log in

We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
Do not sell my personal information.
Cookie SettingsAccept
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
CookieDurationDescription
cookielawinfo-checkbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytics
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
SAVE & ACCEPT