Install magento into an existing wordpress site - php

I have a wordpress site online and I'd like to integrate Magento into my existing site.
Okay so I want to
Download the Magento files
Setup my Apache configuration, for this I already have my site configuration, so I was thinking about putting magento in this url mysite.com/my-store/ ... but for this on apache should I use "location" directive?
What else do I need to consider?

The best way to go about is install Magento in new folder and create new database as Magento requires a lot of resources and you don't want get it mixed.
It all depends what exactly is that you planning to achieve. Either to use your domain name as a main ecommerce and setup the Wordpress as a directory
domain-name.com/blog
if it's a blog or something, or you can setup an alias that points to the folder and have something like this:
store.domain-name.com
Another way to do it if you would like to have everything integrated is to use FishPig Extension and then simply update all the WordPress plugins and point it to your existing database.

these are two seperate programs so best would be to get a plugin for wordpress and integrate magento inside there are a few plugins like this out there http://www.mwi-plugin.com/

Related

Using WPML wordpress with Multilingual laravel application as subfolder

I have a multilingual laravel application. My url structure like that:
https://example.com/en/paths
https://example.com/es/paths
I installed wordpress in /public/blog. It is working successfully.
I also installed WPML plugin in wordpress then url structure was like this,
https://example.com/blog/en/blog-paths
https://example.com/blog/es/blog-paths
So my first URL structure is broken. This is a situation I would not prefer for SEO.
Any advice on how to install wordpress inside Laravel application, keeping the multilingual url structure?
I want to result url structure like this instead of above schemes,
https://example.com/en/blog/blog-paths
https://example.com/es/blog/blog-paths
I'd try to install Wordpress inside public folder of your Laravel app that is in charge of responding to example.com via app/public/index.php
Thus, every request to app/public/blog/ will be handled by WordPress.
Imho, this setup save your current url structure and do not interfere in any way.
Probably you have to adjust your Nginx config, but that is another question.

What is use of /app/code/local/ folder in magento ? Can we put our core php file in it?

I am developing mobile application for existing magento website and the mobile application has its own web admin and web admin developed in core php (not in magento). Can we put the core php web admin code to magento /app/code/local/ folder ? and is it work with magento ?
Please help me on this.
We can consider Magento as an application that is constituted by modules. Each of this module does different functionalities, but still they are independent to each other. This property makes Magento highly extendable and powerful.
By default, Magento comes with lot of such individual modules. These modules are located inside app/code/core. Note that, this folder only holds Model and Controller logic parts. View logics are separated from this and it normally lies in app/design and skin folders.
If you need to extend Magento core functionality or if you need to add any new functionality, you have two options available.
Use an extension
Develop your own custom modules
For extension/pluggin, Magento uses app/code/community directory. This way core modules are seperated from extensions and it gives us lot of flexibility.
When you use your own modules to add any functionality, you probably need to add your module in app/code/local. This way, custom modules are seperated from both core and extensions.
When Magento looks for a module, it will first check that module in local directory. If it is not there, then it will check in community directory. If it is not there, again it will check in core directory. Finally it will check it in lib directory. This callback mechanism is the core concept that you need to understand , before start to develop your own extensions.
It is not necessary to put your custom module in app/code/local directory. You can put it in community or in core directory. This is because, the callback mechanism can pick up your module, irrespective of these three locations. However as I said earlier, three of this directories has its own purpose. So better use them properly as it demands.
Hope that makes lot of sense
From Magento Wiki,
Every custom module will be created in the directory:
/app/code/local
And this is the directory structure that you use to create one:
/app/code/local/<Namespace>/<Module>/
That way, we can have multiple modules under a single namespace.
Naresh, /app/code/local/ is used to put your custom developed plugin/extension for magento. it's main aim to have custom developed code and core code separate.
If in future you upgrade the version of magento than it overwrite/delete the code written in /app/code/core/ but leave the code as it is in /app/code/local/ and it's place where you can override the core block/helper/model as well.
you can't copy your code directly in to core, you have to create module/plugin to club your existing code with magento.

Exposing a web service through WordPress

I'm creating a new plugin for WordPress that requires an outside website to use a web service. For instance, if there are two sites, A and B, the plugin will be installed on A with all associated data stored in the WordPress database for Site A. Site B will use the web service to grab data in XML format from Site A.
Is this possible? What would be the most secure way of pulling this off?
I could just have the web service as a PHP file in my plugin, but that's going to require the outside domain to hit something like:
http://www.example.com/wp-content/plugins/plugin-folder/web-service.php. It seems like a bad idea to expose the level of depth of the WordPress setup.
I could have my plugin create a few files in the root so that the web service call would be to http://www.example.com/web-service.php, but having my plugin install stuff outside of the plugin directory also seems like a bad practice.
Another thought: Could I put the file in my plugin folder, but add a line in file .htaccess to make http://www.example.com/web-service.php go to it?
What is the best, most secure way to go about this?
I would set up a rewrite rule in .htaccess to let the user get to your code without knowing where it is. I don't think there is an easy way to add specific routes to the WordPress front controller, but you could see if there is an action or filter to do that.
Here's a post on adding routes: How can I create custom URL routes?
In my personal opinion, if I installed a WP plugin and you created a new file in my root directory, I would either delete the file or the plugin all together. I would also try to avoid adding a .htaccess file. This would again make me suspicious.
What I would do is, upon install ping a file on Site B (your site) that captures the location of the plugin folder on Site A (their site), because WP might be installed inside of a directory and not at the root. Then you know where the "web-service.php" file is located. Then you can just hit that file whenever you need. There is no reason for .htaccess rules, or creation of new files.
Just a suggestion :)

Wordpress and Mybb

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.

Custom domain with Joomla

Is there any nice component for Joomla 1.0.x allowing to serve custom domains? What I am trying to archieve is to sell subscription to my service and to offer custom branding including custom urls like yourcompany.myservice.com and even example.myservice.com. Any pointers? I am selling subscriptions themselves already for a long time, so the question is specifically on the domain part - how to manage apache vhosts/dns settings/whatever dynamically.
Since Joomla has moved on with version 1.5 it would be hard to find what you want for 1.0. I'd recommend switching to 1.5.
You can easily get multi-domain ability yourself. First you have to make sure all sub domains resolve to the same set of IPs. (*.yoursite.com)
For 1.0 you could probably get away with just plugins, but you might need to edit the core.
If you use a plugin, say a system plugin, in the plugin you can check for the HOST header.
eg:
$host = $_SERVER['HTTP_HOST'];
From this, you base your specific settings/parameters etc. You can also do the check from within components, modules etc.
An example would be loading different template. If the host is a sub domain, then load a custom template for that sub domain.
This is actually a lot easier to do with 1.5 as you can control what loads from plugins.
You don't need to change the apache config. There are several Plugins that can choose the Joomla configuration (including the template) and database based on the Domain name e.g. Joomla Multisites (btw. I would really recommend switching to 1.5)

Categories