I'm building a headless WordPress site with Gatsby. On WordPress, I create a post, using REST API. Get that post to Gatsby and display it. The question is how to host it on the live domain?
So using FileZilla, I put in public_html WordPress files and gatsby build version in there. The result: On startup file, the gatsby website is working. However, if I try to visit the nonexistent page I get redirected to the WordPress theme. Also on gatsby build version favicon icons are working, but on live version is not found, because I get redirected to a WordPress not found page.
Live Website
Using Underscore Theme
Github Gatsby
So the expected results would be. I don't want to see WordPress themes, and favicon icons should work as they worked on the Gatsby built version.
Directory Structure
The better way is to use a static site hosting like Netlify.
You will thus have your front which will be totally separated from the CMS, and in addition, it is free.
Related
I have a wordpress website, I created a customized php template to the homepage and loaded from the back-end in the template page settings.
During the last months everything was working perfectly when I change anything to the template code effects the homepage without any problems.
Suddenly, yesterday when I tried to upload a updated file, nothing changed on the homepage.
I remove the browser cache, and wordpress cache, used another device to check, without any luck.
The wordpress black admin tools bar appears on all sites pages so I can edit and control this page, but it's not appears on the homepage.
For sure I checked again the theme settings for the homepage and page template settings, and everything is correctly configured.
I tried to activate another theme, the surprise that I found the homepage still the same and all other pages changed to the new theme.
I am losing my mind due to this, and I don't understand what may happened.
Download your site on your computer and see whether it happens also on your own computer when simulating with XAMPP.
Are you sure that the new added files are really being uploaded to the server? did you check it up with downloading the files? Maybe the modified files could not been uploaded? Another thing would be that some new installed plugins are making those problems. Have you installed some new plugins like a plugin which are speeding up your wordpress site? There are some popular plugins which speed up your site with caching your whole site and working as a CDN.
Since i dont know which modification you do on your website it is difficult to find a solution. If those modifications are changes of articles then look into the database.
You could look into the SQL Database whether those new information are being saved. E.g. you try to post a new article. Is this article being saved in the SQL database? Do you see any errors on the page? Does this effect each page / section of your website or is it only for a specific module e.g. "image uploader"??
Did you try to replace a simple image on your site with another image ? Can you see the difference on the website? I would start with little steps to be sure whether this is a server issue, template issue or sth with unsufficient priviliges. There were also new wordpress updates, maybe they affected your template? Another thing would be to recover your complete site from a backup and see whether it works like before and be sure that your site has not been hacked.
So i just want to know if the following is possible, and maybe if any help or links to any form of help is available.
What i have/need : I have a live site that i want to slowly start building over again, i want to integrate my local host custom theme site into the live site replacing the section i rebuild.
So i created my own custom theme WordPress website on my local and build a section of of my live website over. Its just because i want to slowly start building the whole live site over but starting at a point.
So now i want to integrate this section into my live wordpress site? That means replacing my current section with this new section.
Is this possible and how can i approach this?
Also i need the custom WP theme to stay as is even though i replaced it with the live section because my client can edit the site on his own with my custom theme.
you should use Version Control for developing the new site.
choose any thing like svn /git. if you have not used anything like this, use hosted SVN, that's simple. something like assembla/beanstalk. anything.
Simply put all your WP code to trunk and create a branch from it. later you can merge the code to trunk.
you will create 2 hosts in your local for testing.
you will checkout the code on your live server.
I'm building a Wordpress site for a friend, and she asked me to "put the old site back up" while I'm working on the WP site. The old site lives in a /verb subfolder, so I put a PHP redirect in the domain/index.php page to the domain/verb folder.
Now, when I go to work on the WP site, it just redirects to the old site. Is there a better way to do this? I need a way to develop the WP site while visitors are sent to the old site.
Note: Her site is on godaddy, which means I didn't install WP myself and can't really move the WP installation to a sandbox area while I'm working on it. Is there an .htaccess trick I could be doing, maybe?
It's been a while but I'm pretty sure i've used a plugin before that allowed me (when logged in as an admin in WP) to view the site using a different theme than the one the rest of the world is seeing.
You could copy the active theme and change the name, making your alterations on the new theme while leaving the currently active theme untouched.
This would only work if you were re-skinning the site and not modifying any of the database content.
A quick google search came up with this plugin: https://wordpress.org/plugins/theme-test-drive/, but there may be others out there...
What's the best way to work on a WP theme on a live site? So that the users see the current theme and I can see the one I'm working on. I know WP has a preview theme option, which works, but it has a sidebar that lets you go back to the WP management page, which means when I try to inspect the source it has lots of extra stuff that the actual theme wouldn't have.
Any ideas? Thanks.
Working on a live site is not a good idea. All changes you make will be viewable to your users.
You have two options here. The first option is to create a subdomain like test.example.com and install wordpress there. From there you can do changes to the theme without worrying about the live site. Once done, you can just move your theme over to the live site.
The second and best option is to install wordpress locally on your pc. I use xammplite for that purpose. It works the same as a live install, but it is faster making changes to a theme. Also, if you make a mistake somewhere like a syntax error, you can correct it quickly, no need to ftp a file backwards and forwards between pc and live site.
If this doesn't cut it, your last least favored option is to download a maintanance plugin and put your site in maintainance mode. You will be able to see and test your site, and everyone else will see a maintainance notice
Yes I know that there is a plug in to bridge the two, but I want to keep them separate. Basically I want the nav menu in wordpress to point to a sub domain or a folder with the mybb forums. Everyone keeps telling me to use the plug in. Also if you add folders to wordpress, will it not just give you errors that those pages do not exist? So is a subdomain the best choice?
It's completely fine to keep the two separate without using the bridge. If you want a link to MyBB from a Wordpress menu, you can add it in the Admin Panel -> Appearance -> Menus, add a Custom Link to your forum URL.
By default, the .htaccess file in Wordpress will not rewrite URLs any folders/files that exist on the server. So it is possible to have MyBB as a subfolder in your Wordpress installation. However, it may be cleaner and easier to maintain if you have it on a separate subdomain.