I want to build a web site in wordpress. A web version like mysite.com and a mobile version like m.mysite.com. I am thinking that will it do able in wordpress because wordpress save domain name in database.
mysite.com/m will be possible but the requirement is to go with m.mysite.com.
The approach in this helped me: http://www.phillipadsmith.com/2011/11/note-to-self-a-simple-way-to-accomplish-mobile-site-redirection-using-mod-rewrite.html
However, proper creation of templates and css will really make the need redundant.
Related
I have a Wordpress website made to show a portfolio of websites, so the client can have an idea about what kind of wordpress-based website I can create for them.
My question is, is there any smart way of creating a live website template inside a website? My approach would be to install another wordpress release into a folder (e.g domain.com/template1; /template2 etc.) but it feels kind of...ancient.
Is there any other way or am I steering into the right direction?
I would say, the easiest way is to make a second customize.php, because there you have the possibility to take a live preview and make a new site template with it.
Important: Do not forget to restrict a lot of settings like, choose this Template - otherwise it will be set as default for your website :)
I am new to web development and and would like advice about what is the usual best practices to achieve what I am trying to do.
I am in charge of writing a frontend app using Vue. This frontend will require a login to access the app. The app will be hosted on Amazon.
However we are also wanting to build an eCommerce site in Wordpress or equivalent that sits on the root of the website, (eg www.mywebsite.com) with the app accessible through a "sign in" button. If the user presses the sign in button we want the location bar location to not change from the website they are on (www.mywebsite.com), even though the Wordpress site and Vue frontend may be stored on different locations/domains.
If the site is made in Wordpress, we can get another developer to do that webpage for us, while I work on the frontend. However we want the experience to be relatively seamless between connecting to the wordpress root site, clicking on the sign in button and being taken to the Vue frontend.
Is this possible? Do both sites have to be hosted on the same server for it to work (eg an Amazon EC2 server which hosts two webpages, the wordpress one and the vue one)?
Or can the wordpress put a link to the Vue frontend which doesn't change the web location to the user?
Or (worst case scenario) do we need to make both webpages in Vue as one Vue application, some pages requiring login to access and others not?
Thanks kindly for any assistance.
So in order to use Vue and WordPress together, you can either write 2 separate applications. One for the Frontend and one for the Backend, which is perfectly fine or you can simply write a WordPress Application with a Vue Theme.
This is how this could look like:
WordPress Backend
You can use a normal WordPress backend, where you can build the architecture you want to. In addition, you need to set up the REST-API Wordpress provides. So this also means, just use plugins which support it. Otherwise, you would need to write custom endpoints. For example, Woocommerce would be a good e-commerce plugin, since it supports the API.
Learn more about it here: https://v2.wp-api.org/
Of course, you can host your WordPress installation on Amazon. Here is a good guide for that: https://aws.amazon.com/de/getting-started/tutorials/launch-a-wordpress-website/
Notice: The REST-API is available in core since 4.7. If you are using an older version you would need to install a plugin.
WordPress Frontend
In order to create your Frontend, I'd recommend you to make a custom theme. Since you are just serving static files this can be done pretty easy. But still, you don't need to reinvent the wheel.
There's a really good starter theme out there: https://github.com/EvanAgee/vuejs-wordpress-theme-starter
It comes with all the stuff you need to get started and since it is just a theme, you can simply set up a usual WordPress hosting without handling Domains of multiple applications.
In order to get the data from the Backend, you would simply make calls to the REST-API. Here's an example: https://github.com/EvanAgee/vuejs-wordpress-theme-starter/blob/master/src/api/index.js
I have a website through shopify, hosting through Shopify, and want it rebuilt in WordPress.
What would be the best way to do this while keeping the original website live until the new website is done? The new website may take a while to be created since the database of products needs a lot of modification.
I was thinking about creating a new hosting account and building it there without connecting it to the domain name, and when it is ready I'll connect it. Does this make sense or is it even possible? Or should I build I'd offline and upload it when it's ready? I'm not quite sure how I would build it offline though...
Thanks in advance!
Like the others said, you can build it offline on your computer using a program like XAMPP to create an offline server, however I prefer to build the new website online on a sub domain of your current domain, and switch it over once the website is done.
For example, if your website is amazon.com you can create a sub domain dev.amazon.com and build it there. You will most likely have to use a search and replace plugin to replace all instances of "dev.amazon.com" with "amazon.com".
As for transferring all your products etc. you can export all your products from Shopify as a CSV file and then re-import it into WooCommerce using a plugin called WP All Import along with the WooCommerce add-on.
Good luck!
You can build it in a new hosting environment set up for wordpress hosting. And yes, you can reassign your domain to the new site when it is ready. I don't think building an offline wordpress site would be wise if you aren't familiar with apache servers or transferring wordpress sites to different servers, it can be a headache.
Funny enough you're asking this. I currently am working on a project that is more or less the same task. The best and most optimal way would to just develop the website locally on your machine, using a program like XAMPP or WAMP.
Here's a link on how to get started using a virtual machine that is localized on your computer: https://managewp.com/blog/how-to-create-a-local-wordpress-website-in-windows-with-xampp
After installing WordPress on your machine, you can proceed by installing Woo-Commerce. This is the best e-commerce plugin which works with WordPress and is highly recommended due to how frequently updated it is. There are tons of themes out there which can help you change the look of your shop depending on what look and feel you want your shop to be.
Since you're porting a Shopify website over to WordPress, I assume the Shopify site didn't have anything crazy over-the-top when it comes to the look & feel...That being said, I would 100% recommend the "Storefront" theme for WooCommerce, which is a great theme, both for developers and non-developers to use. Here's a link to the Storefront theme, which is free:
https://woocommerce.com/storefront/
In terms of hooking up the domain to the website, this can be done once you actually are ready to launch the website. There's no need to have a live domain working for developing.
Good luck! I hope this helps!
I am developing a mobile version of a current WP site, but this mobile version is not WP. So I need to be able to access the information in the database of the non-responsive, existing WP site in this new one. The mobile site is located in a sub-folder called mobile (somesite.com/mobile) in the root directory of the current WP site.
I've visited the WP forum and posted this same question without responses. I've also read their integration page (http://codex.wordpress.org/Integrating_WordPress_with_Your_Website) but it doesn't seem like that would work for this application, because I figure it would just cause the mobile index.php page in the /mobile folder to just revert to the main theme.
Any suggestions or advice would be much appreciated.
You should use the integration guide you posted:
define('WP_USE_THEMES', false);
This part tells wordpress not to use themes.
I think a better approach to this problem is to make the current wordpress theme responsive:
there are a number of ways to achieve this: you can add separate stylesheets for different browser sizes: http://css-tricks.com/resolution-specific-stylesheets/ or you can use css3 media queries directly in the stylesheet: https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Media_queries
You must create the new site using data from the WP site.
Ok. You will need to create your html/php files, but, using WP database.
You can just access WP database and query it... but you will have a lot of work, in some places... like, URL, you will need to transcript URLs saved on database, and, when a user click on that link, you will need treat it to find "back" what URL it means, to catch the content.
I't not a easy job.
The WP_Query (http://codex.wordpress.org/Class_Reference/WP_Query) class can easy your life.
The WP_Db (http://codex.wordpress.org/Class_Reference/wpdb) too.
Both, I think you can use without the whole WP.
But, like #Jonathan said, build a responsive template will be a best solution.
Would like to integrate Cakephp project with Wordpress. Any ideas how to do it best?
It should be my created information system which several pages could be launched from the Wordpress website.
Would like to have everything under one domain - Wordpress website blog (for describing the system) and the system itself.
At the moment I have my information system and bought a Wordpress theme also. Need Wordpress functionality to enrich my current information system based on CakePHP.
The need is to use Wordpress as the login, description, documentation mechanism. That's why I'm not sure how to do it under one domain the best way. Just need consulatancy how to make these two systems with their own databases to work together withinn one domain name.
If more specific - one of the Wordpress page should be the login page of my information system which is handled by the CakePHP MVC. Is that possible?
Maybe it could be done similarly to this approach:
http://www.eiosys.com/blog/solved-install-run-integrate-wordpress-blog-alogside-with-cakephp/
Or maybe here is almost what I need:
http://www.abhinavsood.com/install-cakephp-in-subdirectory-of-wordpress/
Any better ideas?