I am doing some moodle development and have pulled down an existing moodle and set it up on my local machine.
The site runs fine apart from no images display
I am running the site locally as moodle-hy:8080.
The images that are being fetched however are looking at
GET http://localhost:8888/pluginfile.php/107/mod_label/intro/elearning.jpg 404 (Not Found)
Moodle stores all the images in the database and I know there is a missing link in the chain I just cant figure out where it is.
I think it's worth pointing out you may need to run the database search and replace script, at:
http://my-public-ip/moodle/admin/tool/replace/index.php
as referenced in Method 2 here.
This is required if you change the name of the site once you have installed it. If you were already using Moodle under "localhost", then there will be a number of references to the old localhost address stored in the database that need to be updated to the new moodle-hy address.
Related
I am trying to get Wordpress working locally on my Mac. I've downloaded and installed Xampp and also the Wordpress module. But I'm not sure where to go from here, to actually get Wordpress working.
When I try to reach 127.0.0.1/wordpress/ and localhost/wordpress/ I only get the message "Error establishing a database connection".
I can reach PhpMyAdmin, enclosing a screenshot.
Screenshot from phpMyAdmin
I have no clue where to go from here. Do I need to make changes in some conf-files or something? This is the first time I'm doing this so sorry for noob questions, I'm not really a programmer, just want to be able to build my Wordpress sites locally... :)
You need to create a database within PHPMyAdmin, and then configure wp-config.php with the database information. By default, you may only have a file called wp-config-sample.php. Rename the file, and remove -sample from the file name.
The host name will be "localhost", since the database is locally hosted.
The username will be the username to phpmyadmin, and the password will be the password for that account.
The database name will be the database name that you chose.
The prefix can be left alone, as the default is just fine. :)
I migrated from my local computer to my live server using Duplicator. When I switched over, my Wordpress Address (URL) was http://107.343.442.344 - my IP address - and the Site Address (URL) was http://nameofwebsite.com. Everything appears to be working just fine.
However, when I add an item to my cart and try to delete it, it doesn't remove the item. I check the console and there's a failed AJAX request. It's requesting information from http://107.343.442.344. So, I change the Site URL to http://107.343.442.344 and then the everything works just fine. However, now I can't go to my front page.
I tried making these changes to the database (WP-Options), but nothing works.
Does anyone know what I can do to correct the problem. I've contacted WooCommerce, but they're taking forever.
My site is not currently up, so you can't go to it.
Easiest way how to properly migrate your site from localhost to server:
Copy all your local site files to web server
Install and activate "WP Migrate DB" plugin to your local site, it's free and got all functionality you will need.
After "WP Migrate DB" activation you will find it under "Tools" > "Migrate DB". Open "Migrate DB", there will be empty "Replace" block with two fields which you need to fill (look at the picture below).
These two fields are only one you need to fill, after that click on "Export" button and plugin will download mysql database.
Login into your hosting cPanel (or any other webhosting management app if your hosting doesn't provide cPanel, for example, ISPconfig etc.) and create new database or replace old one with that which you just created with "WP Migrate DB" plugin.
Open and edit wp-config.php file on your public_html folder on webserver, replacing database name and other authentification credentials (change database name, database user and password which you created in cPanel) and save this file.
Done, enjoy. :)
i think you database is not migrate properly please try again with wp migrate db plugin or search replace file , if problem still appear then check the serve file and folder permissions
So I found out what the problem was. I was using VHS Host to redirect the IP address to my new server. Once I changed the nameservers to point towards my new server, it worked.
Thanks to everyone who posted a response. I really do appreciate it.
I have created a WordPress project in my localhost, this is working.
I sent my project to git repository for hosting this in my VPS, I cloned the project in my VPS and imported my local database to remote database.
My Wordpress is hosting in remote, but why when I try access admin area with url hwsystem.com.br/wp-admin, this redirecting me to http://localhost/wp-login.php?redirect_to=http%3A%2F%2Fhwsystem.com.br%2Fwp-admin%2F&reauth=1 ?
How can I fix this problem?
I found where the problem is!
This problem is because I import database of my local database, where options_value of options_name in wp_options table is http://localhost, I just change it to my remote domain and is working.
When You move your files please login to your database and update the wp_options table site url and home url fields to your actual location.
Then login to the back end and update all permalinks
All done!
In your wp_options table in the MySQL DB, change the site url value to the remote site's domain name (i.e., hwsystem.com.br). It's most likely currently set to localhost You can also make this change within the admin interface, but seeing as you cannot access it, you'll need to change this value directly within the database.
Depending on your comfortability with MySQL, you can easily update this value with a SQL command, or use a GUI application such as HeidiSQL.
Moving a Wordpress website from localhost to online is not that simple, some times there are a lot of urls you have to change instead of only dealing with wp_options for example images path usually include the full localhost address.
The best and simplest way to make this right is by using this plugin: Duplicator
It will make any needed change it needs to happen, check it out.
You can also try to search and remove/replace localhost strings or anything else with this tool also https://github.com/interconnectit/Search-Replace-DB this works too.
I'm using prestashop to set up an e-commerce website on my cloud server. I was able to successfully install it on the server and it works fine on the server locally, i.e. if I look at the website using localhost on the server. However when I try to access it from a different machine it won't work because, it gets redirected to localhost/index.php? I'm not sure what could be wrong or even where to start looking... any help would be appreciated. Only thing I could think of was the index.php file. It has following 2 lines of code and is generated by prestashop.
I apologize if this is not the correct SO website, as I wasn't sure what the issue could be related to.
Thank you.
When moving an CMS to another domain problems like this often occurs. Most CMS saves the domain they should run on in configuration file oder database. If there is an request for another domain they are sending an redirect (HTTP state code 302) back. I think problem here is that this one is set to localhost.
A short search on google pointed out that prestashop saves a domain name configuration in a mySQL database. Since petrashop 1.5 it should be in a table called PREFIX_shop_url. Before it was saved in PREFIX_configuration as PREFIX_shop_url. But I didn't tested on my own. You should have a look on your own and change the value in database to your new domain.
You could use mysql command line client to connect to database and change the value. If your are not so familiar with SQL you could also use a GUI like phpmyadmin.
I'm having trouble migrating a Wordpress site I've been working on from my local machine onto a host.
I've been through the documentation and as far as I understand, I have to:
Export the wordpress database from my local server.
Edit the wp-config.php file to suit my target server.
Change the URL's in the settings to suit my target server.
Import the database on my target server and move over the adjusted wordpress installation onto my target server.
I can do all of this, but my there seem to be some problems: in my hosts phpmyadmin I can't view or edit any users and neither can I create any databases (there's no option for it). When I try to import a database I get an error: #1046 - No database selected.
What do I not know/doing wrong?
If importing a database, you need to create one first with the same name, then select it and then IMPORT the existing database to it.
I can do all of this, but my there seem to be some problems: in my hosts phpmyadmin I can't view or edit any users and neither can I
create any databases (there's no option for it).
If you're going through CPanel, you won't be able to add a database directly through PHPMyadmin. You should go to your host's home page and look for some wizard to create a database. (it should be next to the PHPMyadmin link.
Alternatively, for moving wordpress, You can install wordpress on your live site, then export your localhost content via Wordpress's dashboard and then import it on the live site.
This article on Moving Wordpress will also be helpful.