I am trying to migrate my website from server to localhost in prestashop. And i have tried following steps.
I assume you’ve configured PHP, Apache and MySQL on your local machine. If you don’t have those things installed, find some informations about how to do it. If you are using Windows I can suggest you installing XAMPP application.
Download all website files from your FTP and put them to the local directory.
Next, let’s export the database from phpMyAdmin to the .sql file and download it. Import that file to your local database.
Now it’s a time to make some changes in your local database, files and BackOffice.
Database:
Go to the table PS_SHOP_URL and change values of following columns:
– domain localhost
– domain_ssl localhost
– If your PrestaShop is located in some addictional directory, set the value of physical_uri (for example, if it’s in the ‘shop’ directory, write /shop/ there)
In the PS_CONFIGURATION table change the value of PS_SHOP_DOMAIN and PS_SHOP_DOMAIN_SSL
Files:
Set the debug mode ON in config/defines.inc.php
define('_PS_MODE_DEV_', true)
1
define('_PS_MODE_DEV_', true)
2. Set your local database parameters in config/settings.inc.php
If your PrestaShop is located in some addictional directory (for example /shop/), edit the .htaccess file. It’s located in PrestaShop main folder. Add to this part…
RewriteRule . - [E=REWRITEBASE:
1
RewriteRule . - [E=REWRITEBASE:
…that directory. Complete code should look like this:
RewriteRule . - [E=REWRITEBASE:/shop/
1
RewriteRule . - [E=REWRITEBASE:/shop/
BackOffice:
Advanced Parameters -> Performance
Select “Force compilation” in smarty settings, disable the cache and clear the cache using button located in upper right header of page.
And this sucessfully transfers my site to local host i am able to access backoffice.
but when i access frontoffice there errors as shown in screenshots
Check in backend under Preferences->Seo & URLs the section Set Shop Url to see if you have the correct url. As far as I can see in the printscreen, your website is still using the localhost url. Also, after checking in the backend, try accessing your website in another browser.
Related
I move my site from localhost to live host server:
1. upload my wordpress website source to server
2. create a database and import localhost database
3. change 'home' and 'siteurl' option to domain name
4. copatible config.php with new live database information
but not load database and show /wp-admin/install.php page!
I try with Duplicator plugin and result is same.
I create another localhost website with this things but work correct!
enter image description here
This generally happens if .htaccess file is missing when you uploaded WordPress to live server. Hiddne file may have been missed when you copied your web pages to server.
Permalinks is another root cause of the issue.
Please check if you are able to browse your admin area directly: http://domain.com/wp-login.php. If so, login and go to permalinks settings. Do NOT make any change and click on Save directly.
This will create your .htaccess file and check your site again.
I am newbie in Composite, I already backup and download C1 websites (www.solve.sg), I also have installed (and working) Composite in localhost. So how to restore websites in localhost?.
I already used method to rename folder CompositesC1 to CompositesC1old, then extract and put extracted web in CompositeC1 folder at localhost but not working and gave me error.
Please help the right method how to read online backup websites and to read that at localhost
I dont know what Composite is, but you probably need to go back to your cPanel / backend of your webhost, dump the DB powering solve.sg and import that into your local instance.
Your hosting provider will probably have a tool called phpMyAdmin; go in there and find the 'Export' tab at the top of your DB and dump it out as a .sql file. You will then import that file into your local environment, probably also using phpMyAdmin.
You may also have to change around some of the settings files that show where your database is relative to your application.
I want to protect some files in my server from download but my site needs to have access in them. I want to protect some subtitles files, which are needed to be accessed by site, but I don't want anybody to download them. The site is hosted.
For example some sites use some strange strings that are connected with user, video and IP. Can be used something like this for my case.
http://www11.some-site.com:182/d/qygiatnqvsulzrqmk7n6nbhddbcscvyguy4auc3fn4nvf23jp64tjcpa/File-needed.mp4?start=0
If you are using Apache, You have to use rewrite rules in your .htaccess file. IF you are using other HTTP Server brand, you should use almost the same logic that I will show here, so check your HTTP server manual in that case.
Explain:
When you type www.me.com/index.php the PHP system puts the content generated by the echo commands you use inside your code.
When you type www.me.com/myfiles/iou345yo13i2u4ybo34ybu3/passwords.txt your server will put the file contents to the client browser, which will ask you to download it as a file or show as a page, depending of the file extension.
Now, if you do something like this in your .htaccess file:
RewriteEngine On
RewriteRule ^myfiles/([^/]*)^.pdf$ /index.php?file=$1& [L]
# avoit direct access to your server directories file listing
Options All -Indexes
You will type www.me.com/myfiles/file123.pdf but the server will execute index.php with the file name as content of the "file" parameter, and there in the code, you will be able to check the session to see if the user has the authorization to download this file.
If the user has the authorization, you then use the readfile() function to send the file to the user and he will not recognize where it came from (I mean the real path).
Look on how to do this here:
PHP - send file to user
Change to 644 permissions in your content.
I bought an application made in Cakephp, everything was fine before, but once I wanted to host it on another server (with keeping the same database and folders), I find the links to the CSS, JavaScript and images do not work.
Please I have no knowledge in CakePHP.
Did you clean up the database?
I had to change some entries by hand once, because the servername/ip/url didn't change.
go to your db management system and search for your old IP/Path/domainname etc....
Did you copy over the (often hidden) .htaccess files when you moved to the new host?
There are three .htaccess files, one in the root of your site, on in the /app directory, and one in /app/webroot
Is mod_rewrite enabled on your new server?
I developed a small cakephp website on local machine. When I upload to my host server, I realize that I must use their prefix for the database name and database user. So, I go and create new database name and new user. When I visit the site, it has this:
Warning (2): mysql_connect() [function.mysql-connect]: Access denied for user 'old_name'#'localhost' (using password: YES) [CORE/cake/libs/model/datasources/dbo/dbo_mysql.php, line 552]
I am 100% sure, I already change the name to "new_name", it runs on my local machine, but I dont know why it still load the old name. I go to ftp, and download the database config file, it clearly stated that, the database user is "new_name", i dont understand why when I go to the site, it loads the old database config. I am new to cakephp, please help.
try to clear the files from your app/tmp directory and tripple check the configuration.
Sometimes it can take a while for files to become live. One host I use has a folder for upload and then they transfer to the live folder from there automatically. Could it be something like this?
You possibly need to specify an IP for the database instead of localhost. Often the database is hosted on a different server to the code.