• The company that hosts our website does not allow PHP. Is it possible to have the database on a different host than my actual domain. The webhost that I will be using for the wordpress database is network solutions, and it does not currently have a domain attached to it. I would like to know if this is even possible or should I be trying to circumvent this in another direction?

    Ideally what I need:

    A blog at https://www.mywebsite.com/blog

    The host at https://www.mywebsite.com does not offer MySQL

    How can I get a blog at https://www.mywebsite.com/blog/

Viewing 5 replies - 1 through 5 (of 5 total)
  • short answer: move to a different webhost.

    You said the host does not allow PHP. You can’t run WordPress without PHP, and it must be installed on the server on which you are running the WordPress code. You also say they don’t have MySQL and you are going to run your database on a different server. Well, run the WordPress code on a different server also.

    If you mean that you already have a non-WordPress site set up at mywebsite.com and want to add a blog to it, and you have to leave your site where it is now (can’t move it to a new host) then set up the blog as a subdomain of the domain, and have it hosted on a hosting account that offers PHP and MySQL. Instead of your blog being at https://www.mywebsite.com/blog it would be at blog.mywebsite.com, running on the other hosting account.

    There’s even free (although not reliable) hosts that offer PHP and Mysql.

    I hope you’re not getting charged much for the space, or you’re at least getting something else to make up for the cost…

    Been a while since i’ve seen a host that doesn’t offer PHP and/or MySQL.

    Agreed. If you have no PHP and no MySQL, just move.

    Thread Starter burtflaxton

    (@burtflaxton)

    The site the company I work for has been with their current host for over 7 years. The website they have and current database is over 38 GB, with well over 500,000 items. Switching the current site to a different host is NOT an option, although I would love to do that, current management will not consider switching hosts. When I brought up the idea, they quickly considered changing web developers though. We pay these “assholes” around 38,000 a year for web hosting & database management, which is beyond me, but it is the situation. Yes it sucks, our webhost is in the frakin dark ages…

    Now, I appreciate the responses, but I am still in the same position as I was yesterday.

    Let me be more specific, so maybe one of you gurus can help me out if you have time.

    If I was going to set up a blog on a different host how would wpconfig.php code look?

    // ** MySQL settings - You can get this info from your web host ** //
    /** The name of the database for WordPress */
    define('DB_NAME', 'putyourdbnamehere');
    
    /** MySQL database username */
    define('DB_USER', 'usernamehere');
    
    /** MySQL database password */
    define('DB_PASSWORD', 'yourpasswordhere');
    
    /** MySQL hostname */
    define('DB_HOST', 'localhost');

    When I set this up using my DB_NAME, DB_USER, DB_PASSWORD, and the IP address of the database for ‘hostname’, my blog cannot be reached when I place the /blog folder onto my webhost. This is the message I get go to https://www.mywebsite.com/blog

    Directory Listing Denied
    This Virtual Directory does not allow contents to be listed.

    Now, I have set up at least 30 wordpress blogs for clients so I know quite a bit about installing and troubleshooting an install, but I am definitely stuck on this one.

    I would imagine there is an alternative solution using subdomains, but I am not 100% how to do that since I have not ever attempted that.

    Any help would be much appreciated.

    *edit* could it just be that the current webhost the site is on does not allow remote connections? Or does that have nothing to do with this?

    That error looks like what can sometimes happen when 1) directory listing is disabled, and 2) there is not index.php and 3) the server isn’t reading .php files.

    How are you trying to connect to your second host from within the blog directory? Some kind of redirector something? What kind of scripting do you have available?

    *edit* could it just be that the current webhost the site is on does not allow remote connections? Or does that have nothing to do with this?

    Sure. Or the webhost that is hosting the MySQL server/PHP Server that you are trying to use isn’t allowing the connection.

    As far as the wp-config question. You can feed it the IP address of your host like define('DB_HOST', '192.168.1.30'); and that works fine at least for me within a LAN. Whether your MySQL server will allow it even with the correct user/pass is another thing entirely. MySQL permissions can be, and I’d bet usually are, tied to particular IPs.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Can I setup a wordpress blog database on a different webhost than the domain?’ is closed to new replies.