Laravel and Wordpress routes and directories - laravel

I'm working on a new Laravel + Wordpress project and I would like these to be the URLs of each part of the site:
example.com: App made with Laravel
example.com/blog: Wordpress blog
example.com/store: Online store made with WooCommerce (Wordpress)
example.com/whatever: Other pages of the Laravel app
And finally, I would like both blog and store to be the same instance of Wordpress avoiding having two separated Wordpress installations. How should I deal with directories and htaccess configurations in order to get what I need?
Thank you!

Check this articles
https://wpengine.com/resources/wordpress-laravel/
https://www.cloudways.com/blog/integrate-laravel-and-wordpress/
https://vegibit.com/how-to-add-a-wordpress-blog-to-your-laravel-application/
https://medium.com/m/global-identity?redirectUrl=https%3A%2F%2Fblog.devgenius.io%2Fwhy-when-and-how-to-develop-wordpress-with-laravel-features-live-examples-f7958cf1b7ea
https://medium.com/#Madgeek_in/how-to-install-a-wordpress-blog-to-your-laravel-web-application-24e79036ce77
and this question
Integrate Laravel into Wordpress
and this package
https://github.com/ekino/EkinoWordpressBundle

Related

Can you use a laravel app to serve theContent() of a Wordpress page?

I wish to have a Wordpress site, but have certain paths served with an application written in Laravel.
For example:
www.mySite.com << just serves the normal Wordpress homepage
www.mySite.com/blah << also handles as part of the Wordpress site
www.mySite.com/blah2 << theContent() is pulled from Laravel, but it's wrapped in the normal Wordpress templating engine.
So, the /blah2 page will look and feel just like the rest of the site, because it's using the templates/headers/footers of templates in Wordpress. However, I'm just injecting theContent() from what I pull from the Laravel code.
I suppose I could just replicate the Wordpress templates in a totally separate Laravel site, but I thought it might be simpler to use the same templates. Also, if they were two different sites, then I'd need www.mySite.com, and www.mySite2.com, which I do not want. I want the two to look seemless.
Is this possible to do?
You would probably need to write a plugin in WordPress to be able to pull the data from the database that is being populated by Laravel.
An easier method, depending on where your Laravel database is sitting, would be to handle it in WordPress using raw PHP.
There could be multiple ways to address this based on your exact setup.

How can I deploy Laravel and Wordpress together on Laravel Forge?

We are trying hard to deploy Laravel website with Wordpress on Laravel Forge but are unable to do so.
Say, if our domain is example.com, the blog should be example.com/blog. However, what we currently have is blog.example.com, which is not serving the purpose.
It'd be great if someone can help us find a fix for deploying Laravel project with Wordpress on Laravel Forge without changing the URL structure.

SEO for Laravel Vue.js App

My Laravel 5.6 app has a Vue.js frontend. The Vue.js app is in the resources directory. I have gone through several articles that use Prerender SPA plugins. These articles are for the stand alone vue.js app and have an index.html file. In Laravel's case we have index.php. How do I make my Laravel Vue.js App SEO freindly. At a minimum I would like to make the front/home page of the app SEO friendly.
I think, as an alternative solution, you can use https://prerender.io/ service (up to 250 pages Free for caching) to do the pre-rendering for your SPA application.
If you are going to implement https://prerender.io/ service, you would require to generate all the sitemap URL paths and upload them to this service via their npm plugin (prerender-spa-plugin) and configure your .htaccess file for search engine crawlers. So search engine crawlers will redirect to this pre-render service and picked your website, cached static web page for service engine indexing, and show that cached page as the search result.
For more info, you can refer below;
https://prerender.io/documentation
https://snipcart.com/blog/vue-js-seo-prerender-example
Cheers!
Definitely recommend checking out Nuxt.js! It is a production-ready framework built on top of VueJS. With Nuxt.js You can create 100% SEO-friendly app with SPA-like routing.
Check this awesome Toptal article about "Creating Server-side Rendered Vue.js Apps Using Nuxt.js"

Laravel + Angular 4

I want to create some project and use there Laravel as API and Angular 4 to represent my site.
Since I have no money for experiments, I found hostinger.co.uk where I can set up php framework and do that I need.
I started configuring Laravel and get confused - where to place my site on angular? I'll have the only one site address. So I'd like to make it combined, because I need Laravel the only for working with DB.
Best practice would be to keep api & frontend seperate.
If you insist on using single domain, such as example.com you can use subdomain api.example.com for API, and main domain for presenting your site.
On a shared hosting you can place folders something like these:
/api -- laravel installation(with subdomain api.example.com)
<angular build files>
index.php
script.bundle.js
style.bundle.js
etc.
......
.....
.....
.....
For development you can keep your angular files anywhere on your local system, and upload only build distribution to the main domain.

Magento wordpress integration

I'm using fishpig wp integration to magento.
I have blog.site.com and I want to keep this domain, while I'm using magento worpdress.
How can I Integrate an existing WordPress blog and keep the same URL's. So that my SEO will not be affected?
Is this possible?
Yes it's possible. You can integrate your existent wp blog in a new Magento store instance or integrate a new blog in an ancient store.
For integrate your wp blog in your Magento instance, you can declare blog.site.com as base_url (secure and|or insecure) in your magento store.
Before that you must check in your wp blog if these urls like : catalog, checkout, admin, api, etc.. it's not already used.
You can retrieve every routings parameters in app/{pool}/{namespace}/{module_name}/etc/config.xml in <frontend><routers><args<frontName> section
After that, you have just to dump your wp db datas in your magento db.
In my memories, I think it is possible to set up a prefix for the tables used by wp fishpig

Resources