Publishing NopCommerce - publish

I have my site up and running, but because of number of changes, i decided to publish an updated version. Before doing so i have made backup of my files and databases on the host, just in case.
Now this is what i did: Publish Nop.Web used FTP, configuration is set to release and from file publish options checked Delete all existing files prior to publish, as i was publishing to the same folder wwwroot. After publish was completed NopCommerce installation appeared (btw i would like to use the same db i used before) even tho settings.txt from the project I was publishing had the correct string path. I tried 2-3 times to pass the installation with no success (error: One or more sequence... something like that), checked settings.txt on the host and it was empty (no idea why), but i just edited it with the string path.
Now installation is gone i have my site running again with all the products and user information (i assume that means string path to db is good), but my theme is reseted to default, like all my changes to it (footer links, background, logo, favicon..etc etc) only thing that stayed as it should was the nivo slider widget that has the correct pictures displaying on this 'reseted' theme.
Checked General settings for theme settings if its the correct theme selected.
Also i have noticed this, i assume with those 2-3 unsuccesful install tried i have made some changes in db
http://i.imgur.com/wfXQYj6.png
Any suggestions how to sort this whole thing, before publishing i was running my site locally and it was good, i have backups of db and files(ones that i used before this publish)
I am using Nop version 3.4 and arvixe hosting. Sorry for my long post but i wanted to describe my steps and error as detailed as possible.
Thanks for reading and looking forward for your suggestions about this.

I haven't tried publishing features of NopCommerce version > 3.10, but you can try a more "manual" approach to make sure that files are properly updated on the server.
In short, you get files from your local machine which are needed for the built website and you upload them to your website folder on the server. You can make a backup and empty the server website folder first.
I presented that approach in this answer:
How to deploy nopCommerce 3.5 to new server from source?
You can check this batch script to see which files need to be sent to the server. The script also includes some suggestions about what else you may need to do to update the website on the server: https://gist.github.com/dan-mirescu/c14cc72e3f8ecca988b7

For Publishing the NopCommerce Application website below is the step:
Step : 1 - Publish the Nop.Web project.
Step : 2 - Publish the Nop.Admin project.
Go to the publish folder where your publish created
Step : 3 - Cut all dll from the Administration and Paste all dll to bin folder which in main bin folder for whole project
Step : 4 - Copy two things from your source project and in App_Data folder Settings.txt and InstalledPlugins.txt which is not published in your publish file so paste this two files in your publish folder in App_Data. (You need to change the connection string in Setting.txt as per your database host).
Step : 5 - Now you need to copy whole plugins folder from your source folder (but remember this plugins folder you need to copy from the Presentation folder not from the main source where the solution file are there.).
Step : 6 - Now your publish have been ready.(now you can deploy on hosting server)

Related

How can I recover MediaWiki pages from an old MAMP install?

I have a three year old or so MAMP install (a copy of the application folder and all its contents, databases, etc.) with a three year old MediWiki (version 1.19) installed on it, several pages, and a few images. I would like to know how I can access those pages (or at least the content on them) and import them or copy them over to a fresh install I made today with the latest versions of MAMP and MediaWiki.
I already tried copying the database folder (MAMP/db/mysql/my_database; contains .frm files) from the old install to the same location in the new install but it doesn't seem to have changed anything. I even looked at the contents of the tables with phpMyAdmin but I didn't find any of the old content. Where do I go from here?
I installed MAMP on my MacBook Pro running OSX Yosemite. I'm hosting locally (e.g. using localhost). I am able to install a fresh MediaWiki on my localhost MAMP server and it works fine (there's just no content).
UPDATE: After seeing this I changed $wgMainCacheType = CACHE_ACCEL to $wgMainCacheType = CACHE_ANYTHING in the MediaWiki local settings file and now I get an error page that looks like this:
Do I need to somehow upgrade my databases? They are old after all. How should I go about doing this?
Shutdown mysql
Just copying the MAMP/db/mysql/my_database is not enough
Copy the contents of your db folder and below to the new
MAMP db folder
Note i assume your new MAMP is pretty virgin
Poached it from here :
http://joejoomla.com/sound-off/157-how-to-upgrade-mamp.html
Start new mysql
Will incl necessary config files
It is not as if you should have expected MAMP to recurse directories
It needs config files from old and you don't have them yet
I have never done it on MAMP
Edit:
Concerning warning that resulted
Make sure that XCache is installed with the new version of PHP. The most likely cause is the new version of PHP simply doesn't have xcache installed. You can do this by creating a php file with just the code
<?php phpinfo(); ?>
and then viewing it in a web browser.
Setting $wgMainCacheType = CACHE_NONE; will disable all caching, which would prevent the error, but make things slow.
From: http://m.mediawiki.org/wiki/Thread:Project:Support_desk/%22CACHE_ACCEL_requested_but_no_suitable_object_cache_is_present.%22
Advice : for this kind of software, use a Virtual Machine, it will save your time : my own mediawiki is running for 8 years under debian, hosted on a several different Apple machines.
But for now, if you still have the former stack running :
0 . (always) save your database content + files
for the database :
https://www.youtube.com/watch?v=NnOE0KWHGkY
for the files :
tar cfvz my-old-mediawiki.tar.gz path-to-mediawiki-directory
This will allow you to rollback if something goes wrong
Export your content and history
go to the special page : "Export pages", list your pages.
if needed, use the special page : "List all pages".
this will produce an xml file.
Save your images somewhere on your file system
use the special page : "List all files".
you now have exported your pages and files
3) Switch stack
check that the new virgin mediawiki is working well
import your pages
go to the special page : "import pages", upload the xml file produced in step 1
you now have a similar wiki, minus the files
import your images :
after the step 4, each file page has been created without its content.
you can upload manually each image exported at step 2) if you have only some of them,
if that is too much files (>30), you can use this procedure : https://www.mediawiki.org/wiki/Manual:ImportImages.php
keep in mind also to reinstall any extensions installed previously.

Subdirectories in openshift project cannot be found

I built a site using a php openshift project and accessing the root directory via http works fine. However, all the root directories give me a 404 not found, like this one: http://test.toppagedesign.com/sites/
I checked with ssh, and /app-root/repo/sites and app-deployments/current/repo/sites/ both exist.
EDIT
Added a directory called php and now I have 503 errors for everything...
EDIT 2
I deleted the php directory, now the 503 errors are gone. However, I do still get 404 errors for the subdirectory.
Here is my directory tree: http://pastebin.com/hzPCsCua
And I do use git to deploy my project.
php is one of the alternate document roots that you can use, please see the March Release blog post here about this (https://www.openshift.com/blogs/openshift-online-march-2014-release-blog)
As for the sub-directories not working, can you ssh into your server and use the "tree" command to post the directory/file structure of your project? Also are you using Git to deploy your project or editing files directly on the server?
You need to have an index.php or index.html file in any directory that you want to work like app-domain.rhcloud.com/sites , if you just have sub-directories, how would it know what to show? Also, indexing (showing a folders contents) is not enabled for security reasons, and I believe there is no way to enable it.
This sounds like it could be a problem with how you are serving your static content.
I recently created a new sample app for OpenShift that includes:
a basic static folder
an .htaccess file (for serving assets in production)
support for using php's local server to handle the static content (in your dev environments)
Composer and Silex - a great starting point for most new PHP apps
You can serve the project locally if you have PHP-5.4 (or better), available in your dev environment:
php -S localhost:8080 -t static app.php
For a more advanced project that is built on the same foundation, take a look at this PHP+MongoDB mapping example. I wrote up a blog post with some notes on my process for composing that app as well.
Hope these examples help!

Openshift: where to put resource files that I want outside of the deployment folder

I'm starting a new web app with Openshift (jboss, mysql). It's the first time I use openshift and after reading through some doc and experimenting a bit with it, I'm having one question regarding best practices for the architecture of my app.
There will be some files generated by- or uploaded to the application (resources). I'd like those files to be outside the deployment folder so they are not erased/overwritten when the app deploys again. I have browsed through the directories and I was wondering:
is it ok to use the /var/lib/openshift/[openshift-id]/app-root/data folder for these files?
Yes, you should use your ~/app-root/data folder for any files that you want to not be erased when you do a git push, there is also an environment variable that you can use that points to that folder called OPENSHIFT_DATA_DIR. Please note that if you are using a scaled application, that folder is not shared among your gears.

How can I stop "jekyll build" from overwriting existing files in the output directory?

The source for my Jekyll-powered website lives in a git repo, but the website also needs to have a couple large static files that are too large to go under version control. Thus, they are not part of the Jekyll build pipeline.
I would like for these to simply live in an assets directory in the Jekyll destination (which is a server directory; note that I don't have have any control over the server here; all I can do is dump static files into a designated directory) that does not exist in the git repo. But, running jekyll build deletes everything in the output directory.
Is there a way to change Jekyll's behavior in this case? Or is there some other good way to handle this issue?
Not sure this addresses the specific case in the OP, but seeing as how I kept getting to this page when I finally found an answer here, I thought I'd add an answer to this question in case it helps others.
I have a git post-hook that builds my jekyll site in my webhost when I push to my host, but it was also deleting anything else that I had FTP'ed over. So now I've put anything I need to stick around in a directory (external/ in my case), and added the following to my _config.yml:
exclude: [external]
keep_files: [external]
and now files in external/ survive.
If you upload Jekyll's output directory via FTP to your server, you can use a FTP tool that lets you ignore folders.
For example, my own site is built with Jekyll, but hosted on my own webspace, so I'm uploading it via FTP.
I explained in this answer how I scripted the building and uploading process, so I can update my site with a single click.
In my case (Windows), I used WinSCP, a free command-line FTP client, for this.
If you're not on Windows, you need to use something else, but there are probably other FTP tools out there that are able to ignore folders.
To ignore your assets folder in WinSCP, you just need to put this line into the script file:
(the file which contains the actual WinSCP commands - read my other answer for more information)
option exclude "assets/"
Now you can upload your large assets folder on the server once, and it won't be overwritten/deleted when you later update your site via FTP.

Adding an external project directory in phpStorm 6.0 to keeping workspace files separated from code?

I am try to keep separate workspace directory and code directories in my php project and sweating to understand/find how this could be achieved. A couple of revisions back I tried phpStorm and found that it does not provide such feature.
I just want to know if phpstorm 6.0 has this feature or still lacking it ? If possible please help me out.
Work Around
File > Settings >[Directories]
+[Add Content Root] to add external directory
Assuming that you have created project separate from code.Some of the tool might not work
as expected
This works for linux using sshfs, sorry for windows users.
I've created this folder structure in my pc
/mnt/remote_code/code/
And i have to mount code from server like this
sshfs user#server:/var/www/server_code/ /mnt/remote_code/code/
Code from server will be mounted in code folder
In PS I open this directory: /mnt/remote_code/
So, that means PS will create this folder /mnt/remote_code/.idea (indexing and saving all project and ide settings), and keeps the code folder (with remote code inside) without changes.
Hope it help you.
Greetings.