Steps to setup jail for use with WordPress

Status
Not open for further replies.

Thousandbuckle

Contributor
Joined
Jul 9, 2014
Messages
136
Hello all, I am wanting to setup a jail that can host WordPress. I know how to create the jail but looking for some help on what packages I need to install and what configurations I would need to make to it for it to work. Currently running FreeNAS 9.10.2-U4.
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
Wordpress + Apache

Wordpress + Nginx

Those are the first 2 hits on google BTW. ;)

Do note that this will get wordpress going but it's up to you to properly secure and harden the installation if you plan on exposing it to the internet.
 

Thousandbuckle

Contributor
Joined
Jul 9, 2014
Messages
136
Hi Jailer, I finally found the same link for WordPress + Apache that you posted, thank you.

I have everything up and running now and I can access the WordPress management page from my local LAN. If I try hitting my external IP address example: 205.65.781.25/wordpress the browser brings up the internal IP of the jail example: 192.158.13/wordpress and says the site cant be reached. Why would it resolve the internal IP address of the jail instead of showing the index.php file?

Hoping someone knows why this is and can help me figure out what to update. I have been googling but
 
Last edited:

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
Moving Wordpress from a local installation to a public accessible one is a bit difficult. I'll try to answer later when I have more time and explain an easy way to do it. Don't do it via a plugin or other method that you find on line.
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
Why would it resolve the internal IP address of the jail instead of showing the index.php file?

Because that's the IP address stored in the database. To fix it you'll have to do a database dump and change all instances of your internal IP to your external domain name and then restore the database. The changes can be done fairly easily on a windows desktop with notepad++ using it's find and replace funtion. You'll also have to change the URL in the admin section from your internal IP to the new URL. Once all that's done restart the database and everything should be working.
 

Thousandbuckle

Contributor
Joined
Jul 9, 2014
Messages
136
Hi Jailer, I know on my QNAP box there is a MyPHP admin tool that I can change the database information as you mention. I had that issue where I changed the QNAP box IP and the wordpress I had running on it stopped working until I updated the database. I did not change the IP of the FreeNAS jail when I created it so I didnt think that was my issue. Is there a tool or how would I do this on the FreeNAS jail? Not sure what the directory path and file name is of the file I need to update as you recommend.
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977

Patrik Hansson

Explorer
Joined
Jan 6, 2017
Messages
78

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
Yes Wordpress seems to be "special" when it comes to moving it from a local installation to a domain. If you don't change all the references in the database it will break your site.
 

Thousandbuckle

Contributor
Joined
Jul 9, 2014
Messages
136
You are both right in terms of the issue but I had one problem that caused complication for the other.

A friend of mine showed me how to install MySQL WorkBench and how to connect to the MySQL DB for the WordPress site. Once connected through this Windows app I could read the WordPress schema for the wp_options table and edit the siteurl and home value from the local LAN to the external IP. I tried this earlier in the WordRress settings general section but it didnt seem to work so I thought I was editing the wrong information.

It turns out my Google OnHub router is not allowing NAT LoopBack even though it is supposed to. I have confirmed that editing the WordPress DB, enabling port 80, and checking from outside my network is working now. Seems I need to get the Google Router issue fixed now.
 
Status
Not open for further replies.
Top