I am hosting or at least supposed to be hosting a LAMP server website on a Pi 2B

WordPress is what I'm using to build the website.

The question is, does the server automatically activate on startup of the Pi? Or is there some process I am supposed to take to turn it back on? I was tinkering around with it a little and on the RPI.ORG website the instructions detail how to install everything.

However it doesn't go into detail about how to operate it properly to be successful. I don't have a constant need for it to be on all the time, so when i do turn on the Pi, I would hope that the server automatically activates on start up.


Assuming you installed Apache via apt-get it will restart on startup without you needing to do anything. You can verify it is running by doing the following:

sudo service apache2 status

Since you mention that you do not need it all the time you can use a similar command to start:

sudo service apache2 start


sudo service apache2 stop

and restart:

sudo service apache2 restart 
  • ok. thank you very much. i knew i was close to the correct answer, but i didnt know how close. i figured i could use the command sudo /etc/init.d/apache2 initiate or something like that. would you happen to have a link on how to make the server available to the outside world using my website's URL after i'm done editing the website? – WP Issues Apr 19 '16 at 20:50
  • Do a search for port forwarding with your router. I would advise against this though. One because the Pi will not serve much load, secondly because you likely do not have the Pi properly secured to be exposed to the web. This would represent a huge risk not only to the Pi and its data, but the rest of your network and data as well. – Steve Robillard Apr 19 '16 at 21:00
  • the website doesnt get much traffic at all. maybe a few hits a week. im not concerned about that. however, is there a firewall and antivirus programs that can be used on RPI? I would assume so. i just started into alot of this, so i am still figuring things out. up until this point i just used the pi to tinker with games and small stuff – WP Issues Apr 19 '16 at 21:09
  • @LAMPPROBS But you should be worried about your security, and there are places you can host WordPress for a few dollars a month. Is your privacy and security worth $5 a month. – Steve Robillard Apr 19 '16 at 21:11
  • 1
    @LAMPPROBS: Without a bunch of hoopla... That would be another question entirely, and I suggest you ask it as such. Server security is a big deal, and I highly suggest you read about how to harden your RPi. – Jacobm001 Apr 20 '16 at 18:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.