{"id":5,"date":"2012-06-17T08:30:00","date_gmt":"2012-06-17T08:30:00","guid":{"rendered":"http:\/\/pheonixsolutions.com\/?p=5"},"modified":"2026-09-08T17:18:28","modified_gmt":"2026-09-08T11:48:28","slug":"install-curl-in-litespeed-webserver","status":"publish","type":"post","link":"https:\/\/pheonixsolutions.com\/blog\/install-curl-in-litespeed-webserver\/","title":{"rendered":"Step-by-Step Guide to Install and Enable cURL in LiteSpeed Web Server"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Introduction<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">cURL is commonly required by PHP applications to communicate with external services over HTTP and HTTPS. If the PHP version used by LiteSpeed Web Server does not have the cURL extension enabled, applications may display errors or fail to connect to external APIs and services.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In LiteSpeed Web Server, cURL is enabled by compiling the PHP build with the <code>--with-curl<\/code> option. This guide explains how to recompile PHP with the cURL extension and verify that it has been successfully enabled.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisites<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Before proceeding, make sure you have:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Root or sudo access to the LiteSpeed server.<\/li>\n\n\n\n<li>LiteSpeed Web Server installed and running.<\/li>\n\n\n\n<li>PHP source code available on the server.<\/li>\n\n\n\n<li>A working PHP build environment.<\/li>\n\n\n\n<li>The required cURL development libraries installed.<\/li>\n\n\n\n<li>A backup of the existing PHP\/LiteSpeed configuration.<\/li>\n\n\n\n<li>Sufficient disk space to compile PHP.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Implementation<\/h2>\n\n\n<p class=\"isSelectedEnd\">Installing cURL in LiteSpeed is a very easy process. You can compile PHP with cURL support in the LiteSpeed Web Server using the simple method shown below.<\/p>\n<p class=\"isSelectedEnd\">Follow the steps below to install cURL in the LiteSpeed Web Server.<\/p>\n<pre class=\"isSelectedEnd\">1) Go to the lsws directory<br \/><br \/>cd \/opt\/lsws\/phpbuild\/php-5.2.6\/<\/pre>\n<p>2) Check the compiled modules in LiteSpeed and check the current status.<\/p>\n<pre>cat config.nice<br \/>cat config.status<br \/>cat config.nice<\/pre>\n<p>3) Now, you need to recompile LiteSpeed with the cURL module.<\/p>\n<p>.\/configure &#8211;prefix=\/opt\/lsws\/lsphp5 &#8211;with-litespeed &#8211;with-config-file-path=..\/php &#8211;with-mysql=..\/mysql &#8211;with-zlib &#8211;with-zlib-dir=.. &#8211;with-gd &#8211;with-jpeg-dir=.. &#8211;with-png-dir=.. &#8211;enable-shmop &#8211;enable-track-vars &#8211;enable-sockets &#8211;enable-sysvsem &#8211;enable-sysvshm &#8211;enable-magic-quotes &#8211;with-curl=\/opt\/curlssl\/<br \/><br \/>make<br \/>make test<br \/>make install<br \/><br \/>Once the installation is complete, you can check the compiled modules using the following commands:<br \/><br \/>\/opt\/lsws\/lsphp5\/bin\/php -m<br \/><strong>\/<\/strong>opt\/lsws\/lsphp5\/bin\/php -i | grep curl<br \/><br \/>That&#8217;s it. LiteSpeed is now compiled with the cURL module.<\/p>\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">By following the above steps, you can successfully compile and enable the cURL module in PHP for the LiteSpeed Web Server. After completing the installation, verify the cURL module using the provided commands. If cURL support is displayed as enabled, the installation has been completed successfully.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">FAQs<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>1. How do I check if cURL is enabled?<\/strong><br>Run: <code>\/opt\/lsws\/lsphp5\/bin\/php -m | grep curl<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>2. Do I need to restart LiteSpeed?<\/strong><br>Yes, restart LiteSpeed after enabling cURL.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>3. Can I enable cURL without recompiling PHP?<\/strong><br>Yes, if a compatible cURL PHP extension package is available.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Related Articles<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/pheonixsolutions.com\/blog\/how-to-install-openlitespeed-on-ubuntu-18-04-20-04-server\/\">How to install OpenLiteSpeed on Ubuntu 18.04 \/ 20.04  Server<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/pheonixsolutions.com\/blog\/install-litespeed-in-whm\/\">Install LiteSpeed in WHM<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Talk to our experts<strong>:<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Looking for the right technology solution for your business?. Our experts can help with\u00a0web hosting, domain registration, DevOps and cloud, software development, web applications, mobile applications, and enterprise solutions. Get in touch with our team <a href=\"https:\/\/pheonixsolutions.com\/contact\" target=\"_blank\" rel=\"noreferrer noopener\">here<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction cURL is commonly required by PHP applications to communicate with external services over HTTP and HTTPS. If the PHP [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[1022],"tags":[238,203,262,159],"class_list":["post-5","post","type-post","status-publish","format-standard","hentry","category-web-architecture","tag-curl","tag-installation","tag-litespeed","tag-webserver","psol-cat-web-architecture"],"jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/phn2x7-5","jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/5","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/comments?post=5"}],"version-history":[{"count":3,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/5\/revisions"}],"predecessor-version":[{"id":11555,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/5\/revisions\/11555"}],"wp:attachment":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=5"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=5"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=5"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}