I need pointing to an accurate up to date method to install Wordpress. I also need details on setting up Apache for it. There is NO official help or support that I can find. Is there anything else beyond the virtual host file and the /etc/hosts edit? How exactly should they be configured? My ip just leads me to the Apache test page, how to I get it beyond that into the sub directory?
-
Try the Ubuntu Serverguide. – Doug Smythies Feb 08 '18 at 22:11
-
I rollbacked the rollback. And I would suggest to leave it at this. – Rinzwind Apr 27 '19 at 10:05
1 Answers
Running a WordPress website on your own webserver is not as simple as one might think (at least if you'd like to have it running smooth and secure for a while). That's why there are so many WordPress hosting companies on the internet, that will take all the hassle out of your WordPress hosting.
Ok. If you really want to run your own WordPress-Server, you will need at least:
- Host OS: Ok you might use Ubuntu already. ;-)
- Firewall: iptables is the base but it is also a bit complex to configure. So additionally use UFW for simplification on top of iptables.
- Webserver: You mentioned Apache. That will work. A great alternative is nginx.
- Programming Language: In case of WordPress it's PHP what you need.
- Database: Typically use MySQL. A great alternative is MariaDB.
- File Storage: For WordPress at least having 500 MB of space might be a good idea, if you think of uploading a few images etc. On your server under /var/www/ you would create a folder for each website, like /var/www/wordpress1/. Check df -h /var/www for enough space.
- A static public IP for your server, a domain name and a DNS server that answers with the correct DNS records for your domain.
First step: setup your domain (if you haven't done so far):
- Register your domain and set DNS records for *.domain.tld and www.domain.tld to the public IP of your server. Pick a domain registration company you trust, maybe something like this one. It may take a while (maybe multiple hours) until the internet knows where to find the server for you domain. So be patient.
Now let's head over to your server. First step here is to setup your firewall:
- For firewall setup with UFW see here.
Then pick one of those webserver/database combinations:
For Apache, MySQL, PHP & Wordpress (including Database) see here.
For nginx/MariaDB, PHP & Wordpress (including Database) see here.
Additionally you might want to have:
- FTP-Server: I like Pure-FTPd. See here.
- SSL Encryption: SSL-Certificates can be created with Let's Encrypt / certbot-auto. See here.
- PHPmyadmin: If need a graphical interface for your database you might want to have this. See here.
- Server hardening: There are so many things to do to protect your webserver. Maybe a good starting point is fail2ban. There is also a WordPress plugin to support banning IPs of failed logins. See here.
- Server performance: Oh my. So many things that can be done for performance tuning. Where to start? Maybe here.
- Automate Ubuntu security updates: See here.
- Secure SSH login: In fact, this is the first thing I do on every server. So maybe you've done it already, too. If not, have a look here.
- And don't forget to reboot your server and check the log files in /var/log for errors.
There are also a lot of complete how-tos on the web, from host setup to backup and server hardening. For example see here.
Thank you for reading up to this point.
Maybe if setting up all those single components sounds too complex, you might be interested to hear that there is also a pre-installed docker container you could download, run and configure. See here.
And of course you could run WordPress in the cloud on your own EC2 instance. See here.

- 401
-
Thank you but i am not hosting on a public domain, i am keeping this on my local network. The configuration of the apache part of the server is i think the main issue. – wayne Feb 09 '18 at 00:59
-
1Ok, you did not say that. So how should I know? You've been asking for 'pointing to an accurate up to date method to install wordpress'. But now it seems like you have a more specific problem? I can think of at least 50 issues you could be facing with apache not showing the right page. Do you want me to list and answer them all? Please don't waste other peoples time. Use google yourself. Then ask more specific if still needed. And provide sufficient information, config files, error messages etc. so I can help you. – Bob Feb 09 '18 at 10:37
-
php-mysql extension was missing from php7. FYI i did use google, exhausted all the main options that were from the last 3 f-in years, ignored ones going back 10, hence i came here for guidance and knowledge. You could have just ignored my post instead of wasting time trying to answer without actually answering. I bet you had to ask questions when you first started using Linux so dont be a nob. Do you hang here just to make people feel little or boost your own ego. Its no wonder people dont get on with Linux. – wayne Feb 09 '18 at 20:27
-
3Come on. Don't get angry. Glad to hear you've found a solution yourself! You asked, and I tried to give an answer based on the information you've provided. That's it. I tried not to ignore you, as you literally wrote 'my previous question was ignored'. It's not about nobs and egos. It's just about providing more information to get better answers. – Bob Feb 09 '18 at 21:01