Skip to content

configure ghost and wordpress combo

Moved Solved WordPress
  • Hello, I am trying to configure Ghost and WordPress, but Iā€™m stuck on the Nginx configuration and SSL setup. With the help of ChatGPT, I installed PHP 8.3 and WordPress, but when I access wp.domain.com, it still loads domain.com (Ghost). I think I may have made a mistake somewhere. Where should I check for the issue?

  • Did you also add wp.domain.com as an A record in your domain registry to point to your server IP? There are probably other ways of doing this as well. Whether you are using the DNS on the hosting provider to manage your dns or you go to where you have your domain registered, there you can usually add the wp.domain.com as an A record pointing to your serverā€™s public IP address. Then it may take a little time for that to propagate out so you can ping wp.domain.com and see the ip address you added. I apologize if this sounds a little confusing.

    I usually have it setup in itā€™s own .conf file with the root entry pointing/to/your/folder.

    So example you have:

    server {
        listen 80;
        server_name wp.domain.com;
        root /path/to/your/subdomain/folder
    
        Then the rest of your setup here . . .
    }
    

    Then donā€™t forget to use

    sudo ln -s /etc/nginx/sites-available/yourfilename.conf /etc/nginx/sites-enabled/yourfilename.conf
    

    You will also need to restart your nginx server sudo systemctl restart nginx

    If you want to post your conf file we can take a look at it as well.

  • Hello, I am trying to configure Ghost and WordPress, but Iā€™m stuck on the Nginx configuration and SSL setup. With the help of ChatGPT, I installed PHP 8.3 and WordPress, but when I access wp.domain.com, it still loads domain.com (Ghost). I think I may have made a mistake somewhere. Where should I check for the issue?

    @Hari do you have seperate nginx.conf does for each domain?

  • phenomlabundefined phenomlab moved this topic from Networks on
  • Did you also add wp.domain.com as an A record in your domain registry to point to your server IP? There are probably other ways of doing this as well. Whether you are using the DNS on the hosting provider to manage your dns or you go to where you have your domain registered, there you can usually add the wp.domain.com as an A record pointing to your serverā€™s public IP address. Then it may take a little time for that to propagate out so you can ping wp.domain.com and see the ip address you added. I apologize if this sounds a little confusing.

    I usually have it setup in itā€™s own .conf file with the root entry pointing/to/your/folder.

    So example you have:

    server {
        listen 80;
        server_name wp.domain.com;
        root /path/to/your/subdomain/folder
    
        Then the rest of your setup here . . .
    }
    

    Then donā€™t forget to use

    sudo ln -s /etc/nginx/sites-available/yourfilename.conf /etc/nginx/sites-enabled/yourfilename.conf
    

    You will also need to restart your nginx server sudo systemctl restart nginx

    If you want to post your conf file we can take a look at it as well.

  • Hariundefined Hari has marked this topic as solved on
  • Did you also add wp.domain.com as an A record in your domain registry to point to your server IP? There are probably other ways of doing this as well. Whether you are using the DNS on the hosting provider to manage your dns or you go to where you have your domain registered, there you can usually add the wp.domain.com as an A record pointing to your serverā€™s public IP address. Then it may take a little time for that to propagate out so you can ping wp.domain.com and see the ip address you added. I apologize if this sounds a little confusing.

    I usually have it setup in itā€™s own .conf file with the root entry pointing/to/your/folder.

    So example you have:

    server {
        listen 80;
        server_name wp.domain.com;
        root /path/to/your/subdomain/folder
    
        Then the rest of your setup here . . .
    }
    

    Then donā€™t forget to use

    sudo ln -s /etc/nginx/sites-available/yourfilename.conf /etc/nginx/sites-enabled/yourfilename.conf
    

    You will also need to restart your nginx server sudo systemctl restart nginx

    If you want to post your conf file we can take a look at it as well.

    @Madchatthew, thanks! Iā€™ve set up Nginx and added SSL for both domains.

    At first, I used DigitalOceanā€™s one-click setup to install Ghost on domain.com. Later, I also installed Ghost on domain2.com, and that worked without any issues.

    But when I tried setting up wp.domain.com for WordPress, it kept redirecting to domain2.com instead of wp.domain.com after doing all the ngnix settings.

    I gave up on that setup and tried installing WordPress on another droplet with a LEMP stack, but I ran into an issue with the upload file size limit. I might chose to Hostinger for hosting WordPress instead.

  • @Madchatthew, thanks! Iā€™ve set up Nginx and added SSL for both domains.

    At first, I used DigitalOceanā€™s one-click setup to install Ghost on domain.com. Later, I also installed Ghost on domain2.com, and that worked without any issues.

    But when I tried setting up wp.domain.com for WordPress, it kept redirecting to domain2.com instead of wp.domain.com after doing all the ngnix settings.

    I gave up on that setup and tried installing WordPress on another droplet with a LEMP stack, but I ran into an issue with the upload file size limit. I might chose to Hostinger for hosting WordPress instead.

    @Hari said in configure ghost and wordpress combo:

    But when I tried setting up wp.domain.com for WordPress, it kept redirecting to domain2.com instead of wp.domain.com after doing all the ngnix settings.

    I might have more detail that you need, but I am not sure how your setup is currently. So I intend no offense if I am describing things in more detail than you need.

    So are you controlling your DNS records through DigitalOcian or through the company that you purchased your domain name through? Which ever way you are managing your DNS, you will need to add an A record wp.domain.com that points to your serverā€™s IP address, and a CNAME for www.wp.domain.com that points to your wp.domain.com A record. You would set this up just like you did for the main domains, but the subdomain is in with the rest of the DNS settings that you have your domain.com.

    When you are setting up Nginx conf file for wp.domain.com (this should be itā€™s own conf file), you do need some extra settings in there in order for Nginx to work with Wordpress.

    Depending on where you are storing your wordpress files, /var/www/domain.com as an example, you will need php-fpm installed and running on the server as well. To see if you have that installed you can type the following:

    sudo systemctl status php-fpm
    

    If you get a message saying that it isnā€™t installed, you will need to install it and start and enable the service.

    You will also need to add the following code to your wp.domain.com conf file.

       server {
    
            listen 80;
            server_name wp.domain.com www.domain.com;
            root /path/to/subdomainfolder;
            index index.php index.html index.htm;
    
            access_log /var/log/nginx/wp.domain.com.access.log;
            error_log  /var/log/nginx/wp.domain.com.error.log;
    
            location / {
                    try_files $uri $uri/ /index.php?$args;
            }
    
            location ~ \.php$ {
                    try_files $uri $document_root$fastcgi_script_name =404;
                    include fastcgi.conf;
                    fastcgi_split_path_info ^(.+\.php)(/.+)$;
                    include fastcgi_params;
                    fastcgi_intercept_errors on;
                    fastcgi_pass unix:/path/to/php-fpm.sock; # This is usually /run/folder/path
                    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                    fastcgi_cache WORDPRESS;
                    fastcgi_cache_valid 200 60m;
                    fastcgi_cache_bypass $skip_cache;
                    fastcgi_no_cache $skip_cache;
            }
    
    
            location = /favicon.ico {
                    log_not_found off;
                    access_log off;
            }
    
            location ~* \.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|css|rss|atom|js|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|>                expires max;
                    log_not_found off;
                    access_log off;
            }
    
            set $skip_cache 0;
    
            if ($request_method = POST) {
                    set $skip_cache 1;
            }
    
            if ($query_string != "") {
                    set $skip_cache 1;
            }
    
            if ($request_uri ~* "/wp-admin/|/wp-login.php") {
                    set $skip_cache 1;
            }
    
    }
    
    

    The above is what I have for one of the wordpress sites I manage.

    @Hari said in configure ghost and wordpress combo:

    I gave up on that setup and tried installing WordPress on another droplet with a LEMP stack, but I ran into an issue with the upload file size limit. I might chose to Hostinger for hosting WordPress instead.

    The upload size limit is kept in your php.ini file. It is under max_upload_size or something like that. You will also want to change your post_max_size and one other one that is similiar to that, that I canā€™t remember the name of. You could put in like 200 M or less or more if you wanted. That will be like that no matter what stack you are using or which hosting service you are using. Even if you are using Virtualmin you will need to make that change in the php.ini for that website.

    I hope this helps you out. You can always give us a description of your site and post your config files along with you Nginx conf files for your sites and we can see and hone in on what may be happening and why it isnā€™t routing like it should.

  • Another thing I thought of, is make sure to install all of the php extension for Nginx. Below is a link to the php extensions you will want to install as well. You will want the highly recommended and I usually will install the suggested as well.

    https://make.wordpress.org/hosting/handbook/server-environment/#php-extensions

    Also remember if you make changes to restart php-fpm service and nginx service.

  • Another thing I thought of, is make sure to install all of the php extension for Nginx. Below is a link to the php extensions you will want to install as well. You will want the highly recommended and I usually will install the suggested as well.

    https://make.wordpress.org/hosting/handbook/server-environment/#php-extensions

    Also remember if you make changes to restart php-fpm service and nginx service.

    @Madchatthew even if @Hari has abandoned his attempts, this additional information youā€™ve provided is very useful for someone else who may find themselves in a similar situation.

    Thanks

  • @Madchatthew even if @Hari has abandoned his attempts, this additional information youā€™ve provided is very useful for someone else who may find themselves in a similar situation.

    Thanks

    @phenomlab You are welcome. I had thought if I should post or not in regards to his reply but thought just in case if he tries it again. But I am stubborn and will keep trying until I force it to work haha. If anyone has the same issue, hopefully this will help.

  • @phenomlab You are welcome. I had thought if I should post or not in regards to his reply but thought just in case if he tries it again. But I am stubborn and will keep trying until I force it to work haha. If anyone has the same issue, hopefully this will help.

    @Madchatthew Iā€™d always post for the reasons I stated above. Itā€™s useful information and could save someone else the headache.


Did this solution help you?
Did you find the suggested solution useful? Why not buy me a coffee? It's a nice gesture, and a great way to show your appreciation šŸ’—

Related Topics
  • WP / Woocommerce Mystery

    Solved Configure
    23
    1
    12 Votes
    23 Posts
    1k Views
    @Panda said in WP / Woocommerce Mystery: Just back to my other question, have you ever used Shopify? It insists on a templating language to use any custom js. Not personally as never had any need, however, I do know that it uses Liquid for JS templating. Itā€™s written in Ruby and is used to generate dynamic content on shop fronts. Thereā€™s zero reason as to why it wouldnā€™t work with data supplied by 3rd party APIā€™s, although WordPress code wonā€™t natively work for obvious reasons, and as such, this code would need to be re-written. The JS part will likely work with minor modification, but not the PHP file in itā€™s current form.
  • WordPress and NodeBB on different machines

    Solved WordPress
    10
    2 Votes
    10 Posts
    635 Views
    @phenomlab thank you for information.
  • 6 Votes
    36 Posts
    3k Views
    @justoverclock said in Digitalocean step by step guide to nginx configuration: iā€™m learning And thatā€™s the whole point of this site If you donā€™t learn anything, you gain nothing.
  • nginx can't start again

    Moved Solved Configure
    20
    2 Votes
    20 Posts
    1k Views
    @elhana-fine Yes that will happen of course if you still choose to restart the NGINX service after making a change and the test fails. The test on itā€™s own will state the error and the line number allowing you to fix that first
  • 1 Votes
    2 Posts
    367 Views
    @hari the cache level for woocommerce should always be bypass. Any caching of woocommerce will cause you serious issues and will result in the checkout process not functioning correctly. This does mean that the overall experience will be slower (depending on geographic location) although CF is known to cause significant issues hence the need to bypass. If you want to cache as much as possible, then set rules to bypass caching on the cart and account pages etc.
  • WordPress installation

    WordPress
    6
    0 Votes
    6 Posts
    551 Views
    @phenomlab said in WordPress installation: @jac that plugin is for single sign on between WordPress and NodeBB. The plugin you really need is this Brilliant, that does look good!
  • nginx seo urls

    Solved Configure
    15
    3 Votes
    15 Posts
    1k Views
    @riekmedia that looks fine to me
  • Digitalocean Ubuntu configuration

    Solved Linux
    33
    12 Votes
    33 Posts
    3k Views
    @phenomlab thank you! not me