DISCOVER
×

How to restart PHP on centos

Updated April 13, 2017

PHP is an interpreted language designed to create dynamic websites. CentOS is a free and opensource enterprise class Linux operating system based on RHEL (RedHat Enterprise Linux.) PHP is integrated with the web server running on the server. In order to restart PHP, you need to restart the server it is attached to. The two most popular web servers on Centos are Apache and Lighttpd.

Open a terminal or connect to CentOS using SSH.

Type in "su" and press 'Enter." Type in your administrator password and press "Enter."

Type "apachectl restart" and press "Enter."

Open a terminal or connect to CentOS using SSH.

Type in "su" and press 'Enter." Type in your administrator password and press "Enter."

Type "/etc/init.d/lighttpd restart" and press "Enter."

Tip

Linux is case-sensitive.

Warning

Make sure no users are doing critical work on the web server when you restart it.

Cite this Article A tool to create a citation to reference this article Cite this Article

About the Author

Andrea Helaine has a Bachelor of Philosophy in theology and is currently finishing her thesis course for a Master of Fine Arts in creative writing. Helaine has been writing professionally for over 10 years and has been published in several anthologies and is currently breaking into the screenwriting market.