Error when running WordPress on new server - php

I've just upload a WordPress project into a web server. Everything went fine with the exception of the User-Photo plugin. The problem I'm having is that its doesn't seems to find the basedir path. This is the error:
Upload error: Unable to place the user photo at: /var/www/clients/client2/web4/web/arsoblog/wp-content/uploads/userphoto/1.jpg
First of all, I don't know where this path is. Even on the local server, where the site is working good, is using the exact same path, which I can't find.
Maybe someone of you knows what could have changed from one server to the other. By the way, the blog is inside another site in the web server, which is developed using CakePHP.
EDIT --- I'm having the same problem with all the uploads!

The problem is in your upload directory. When we develop the WordPress site in localhost, the default upload directory will be point to your localhost only. When you move to online server, this directory path will not change.
To override this do the following steps:
Login to your cPanel/control Panel
Go to phpMyadmin
Select your database.
Go to wp_options table
On the second page (around 58th row) Edit 'upload_path'(For the first time this row may be blank).
Give your correct directory.Eg: /home/username/public_html/folder-name/wp-content/uploads
Change "username" and "folder-name". Username is usually the username you use to login to cPanel, or your domain’s control panel. Folder-name is used for the sites hosted in subfolders. If you hosted the site in root folder, remove it.
Here is a detailed tutorial How to move wordpress to a new server or host.
If you already used WordPress uploader in localhost, you need to do a search in wp_posts table and replace your localhost reference to your live site's reference. There are some plugin available to do these search and replace in database. Check this one
Hope this will solve your problem.

777 permissions are dangerous and not the correct fix for the issue. You will get hacked with 777 permissions. See Hardening WordPress « WordPress Codex

For solving this problem you have follow some step,
*Login to your cPanel/control Panel
*Go to phpMyadmin
*Select your database.
*Go to wp_options table
*On the second page (around 58th row) Edit 'upload_path'
*Give your correct directory.Eg: /home/username/public_html/folder-name/wp-content/uploads
then you shift your server See tutorial
for more
http://www.techyv.com/questions/error-when-running-wordpress-new-server

Related

Issue accessing local hosted Wordpress site (redirects+other nonsense)

I have ran into quite the issue.
I have been developing a website hosted locally with MAMP. I always used localhost:90/wordpress/ to access the website and it was worked up till today. A few hours ago, I began the process of moving the website from local server to an actual domain. Unfortunately, I wasn't checking URLs and ended up changing some information and working on localhost myPHPadmin panel as opposed to the domain myPHPadmin panel. Long story short, I changed so much before I realized my mistake, then proceed to change even more, and now I am lost and don't know what to do. At this point, I am just trying to get access to my local hosted website so I can start over again.
The issue:
Everytime I goto localhost:90/wordpress, Chrome redirects me to localhost/wordpress and my website doesn't show, it says that the website can't be shown.
I have tried going into my local hosted myPHPadmin panel and changing siteurl and home to both say localhost, but no luck. Interestingly, when I change both to wordpress, it shows an unformatted version of my homepage (Kinda like just straight HTML), with limited images, however if I click any links then it brings me to wordpress/about and it doesn't exist. If I change it to just localhost:90, it shows my unformatted wordpress Page not found page. Can't access wp-admin with any of them.
I have tried using a replace tool recommended in another thread, but searching for localhost and replacing with localhost:90 yielded no results for me. I have also double checked the .htaccess folder and it is correct. I have cleared cookies/cache and still nothing. I am desperate.
Any help is much appreciated.
I am not sure what the issue is here so I am going to shoot in the dark here and hopefully one of these methods will get you out of your predicament. Since you say that you have reverted all the changes you made and still your website is inaccessible, even wp-admin.
You can try doing the following:
Change the siteurl and homeurl links in your PHPmyadmin to localhost:90/wordpress or whatever it was before when your site was running and functional.
In your Wordpress root folder, there is a file called wp-config.php. Open that file and find:
* #package WordPress
*/
Add after:
define('WP_HOME','localhost:90/wordpress');
define('WP_SITEURL','localhost:90/wordpress');
You will replace all localhost:90/wordpress if need be by which I have written in my codes to what the link was before; when the site was functional.
Check the file thoroughly and through Find/Replace function of your favourite text editor for no duplicate entries.
Now try accessing wp-admin. If you still cannot access your wp-admin, take a backup of your current wp-admin folder.
From a fresh Wordpress of the same version as yours, copy the wp-admin folder and replace it with your current wp-admin folder. Now try to access wp-admin again.
If you are able to access it and login, refresh your Permalinks. See if your site is accessbile again after doing these steps.
Update:
Since none of those steps worked for you, try doing the following:
Delete all the Wordpress core files from your localhost:90/wordpress EXCEPT wp-config.php and your wp-content folder.
Now from a fresh Wordpress folder, copy the files and folders EXCEPT wp-config.php file and wp-content folder. Paste them in your localhost:90/wordpress folder.
Try accessing your website now.
Update 2:
Try uploading your Wordpress to your online server and change the values of siteurl and homeurl in your wp-config.php file. We defined the localhost addresses in the file, now you will update those with your domain details.
Take a fresh backup of your database from your localhost and import it into a new database in your online server. Update the homeurl and siteurl in your newly imported database.
Update your wp-config.php with the new database name and username and password of the account you have given all privilages to access the database.
Try accessing wp-admin now.
If successful, update your Permalinks and then try accessing your website.
This will tell us if your localhost is faulty.

Magento: Object not found in localhost

I'm trying to copy website made in Magento in my localhost and finished another steps:
downloaded whole website via ftp account,
import database from server,
change parameters for database in local.xml (post root for user and empty
field for password),
clear cache in Magento var folder,
change base_url value in database
When I try to open it in browser, Homepage looks ok, but any link in page give me Error 404 - Object not found. I can't access to admin panel. Anything what I type URL after localhost/nameOfMyProject, I get Error 404.
I have 2 other Magento projects in my localhost and they work correctly, but both of them I installed from fresh Magento installation and then add new themes for them.
Here is different situation. I need to add whole existing project from server in localhost. I can't add this website on same way, because developer who made it changed files into core section. Project is too big it's not possible at the moment to change that, so any way is to download whole project in localhost.
Does anyone has some suggestion what to do?
Best Regards,
Mladja
Check you also downloaded the .htaccess file and mod-rewrite is enabled in your apache conf.
To access to admin panel try: localhost/nameOfMyProject/index.php/admin

Broken links after moving wordpress site

I moved my wordpress site from local host to a live server. The problem is that all links from my nav won't work as the home button.
live site url: http://iulian.cablevision.ro
broken link example: http://iulian.cablevision.ro/about/
this is the error that i get:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, root#localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Apache/2.2.27 (CentOS) Server at iulian.cablevision.ro Port 80
I tried to use the a comand in SQL on my database to update urls:
UPDATE wp_posts SET post_content = REPLACE(post_content, 'localhost/wordpres/', 'www.iulian.cablevision.ro/');
And I also tried to use the Velvet Blues pluginbut that didn't work as well... Is the another way to manipulate the database so my links will work properly?
I folowed the tutorial from http://www.wpbeginner.com/wp-tutorials/how-to-move-wordpress-from-local-server-to-live-site/ but seams to not work for me... Wher is my mistake?
first go to files and rename the htaccess file and then check your live site .it will help you surely.and if you have any issue regarding please descibe in detail
For fixing all links after database migration, I use this tool. After downloading, rename folder for example searchandreplace, add this folder to the root of WP site, access it www.yoursite.com/searchandreplace, and then enter the old site name and in replace input write your new one, but be sure that they both use same convention wording, if you write old site name www.oldsite.com, then new one should be www.newsite.com too, not http://* or something else added. Hope this helps if the problem still persists.
Your old server is not only in the WP_POSTS table, but also in other tables. See here how to move your wordpress site:
http://codex.wordpress.org/Moving_WordPress
Download your existing site files.
Export your database - go in to mySQL and export the database.
Move the backed up files and database into a new folder - somewhere safe - this is your site backup.
Log in to the site you want to move and go to Settings > General, then change the URLs. (ie from http://example.com/ to http://example.net ) - save the settings and expect to see a 404 page.
Download your site files again.
Export the database again.
Edit wp-config.php with the new server's mySQL database name, user and password.
Upload the files.
Import the database on the new server.
First you need a .htaccess if you are using permalink other than default structure copy from here
Now that you have .htaccess try this
Re save permalinks
Check that your server has mod_rewrite enabled
I finaly found the solution. It was the .htacces file the problem... The first mistake I did was that when I was uploading the .htacces file to the server it uploaded as simpe .txt file and the conversion to htacces file type didn't turn. So what I did:
crated a simple text document with no name and uploaded to server
after i uploaded the file i changed the name into .htacces so then the file conersion kicked in.
After that my links worked flawless.
Thanks for the suport you guys gave me btw.

The file 'wp-config.php' already exists?

I have made a copy of and edited the wp-config-sample.php file with all of the database details that should be in it (obtained from my host, and also created in mamp pro data user).
I have also replaced the unique phrases and corrected all $ with S as suggested by WordPress forum, forums here and tutorials.
I also then saved it as wp-config.php as suggested. When I then go to Wordpress and say submit it says that the file already exists.
In my Wordpress folder there is both the original sample file and the edited one I was asked to either create or edit. If I delete the sample page and submit it says I am missing a wp-config.php and need to create it. I put it back and it says the file already exists. I then edited the wp-config-sample.php file and just corrected the name as wp-config.php and still nothing I try or change works.
(I solved this problem as my root password in mamp pro was not the same as in the wp.config file, as soon as I had that corrected it all fell into place and worked :-))
sorry, i am not allowed to comment, but are you developing on a local machine or through a web hosting? I believe your in Mac. The safe bet here would be, for you, to delete the wordpress folder in the htdocs directory, untar it again there, and from the browser go to localhost/wordpress-folder-name and follow the wizard. (open up localhost/phpmyadmin to setup MySQL database)
If you want to put the wordpress in a live web host, then use ftp to upload the wordpress directory (you will have to change the settings). So, actually, unzipping a fresh copy of wordpress directly, and following the wordpress setup wizard online would be easy. For the MySQL database, use the settings provided by the host.
In these steps, you never have to touch the wp-config-sample.php nor wp-config.php file.

WP migration, can't login to WP admin

I was in the middle of migrating a local WP site to a live server and came across a problem.
I edited my WP config file and uploaded it along with the rest of the WP files. I also uploaded the mysql database through phpMyAdmin.
Once i tried to test the site i got an error message "The page isn't redirecting properly". I then, mistakenly, logged in to the admin area and in the Settings > General tab I deleted the localhost part of the URL. Now I'm unable to log back in to the WP admin area.
EDIT
To clarify, my major problem is that i can no longer log in to the wp admin area because of something I've done. The steps i took to get to this point were:
Backed up WP using the BackUpWordpress plugin
Edited back up wp-config file with define('WP_HOME','http://example.com'); define('WP_SITEURL','http://example.com');
Created mySQL database through DreamHost
Changed database info in wp-config file
Uploaded wp files (not including mySQL backup) to my url using Filezilla
Imported mySQL database backup to DreamHost
I then checked the site from my browser, an error message said too many redirects occurred
From the wp admin area i went to Settings > General and deleted the localhost part of the url that was displayed.
I believe it's due to the previous step I'm now unable to access the wp admin area at all.
I need a way of getting back into the admin area
You can also edit those options within phpMyAdmin. Go to wp_options and locate siteurl and home. Make sure the URL matches your site URL.
You can also edit the site URL in your wp-config.php.
Add these lines somewhere above the /* That's all, stop editing! Happy blogging. */ line.
define('WP_HOME','http://my-site.com');
define('WP_SITEURL','http://my-site.com');
This should overwrite your database settings.
I believe the problem is that studiomed.co.uk is permanently redirected (301) to www.studiomed.co.uk and www.studiomed.co.uk is permanently redirected (301) to studiomed.co.uk
Login to your Dreamhost account go to Domains->Manage Domains and choose one of the three options there are in "Do you want the www in your URL?".
After that use an ftp program to download the .htaccess file that exists in your root installation of wordpress and open it with your favorite editor. Check if you have any kind of redirection in the .htaccess file.
Which version of WordPress do you use?
Can you list the plugins you are using?
Have you gone through the basic WordPress troubleshooting steps?
flush any caching plugins you might be running, as well as server
and/or browser caches.
deactivate all plugins to see if this resolves the problem. If this
works, re-activate the plugins one by one until you find the
problematic plugin(s). Sometimes, an apparently inactive plugin can
still cause problems.
If you can't get into your admin dashboard,
try resetting the plugins folder by FTP or PhpMyAdmin (read
http://codex.wordpress.org/FAQ_Troubleshooting#How_to_deactivate_all_plugins_when_not_able_to_access_the_administrative_menus.3F
if you need help).
switch to the Twenty Eleven theme (depends on your WordPress version) to rule out any theme-specific problems.
If you can't log in to change themes, you can remove the theme folders via FTP so the only one is twentyeleven. That will force your site to use it.
manual upgrade. When all else fails, download a fresh copy of the latest.zip file to your computer, and use that to copy up. You may need to delete the wp-admin and wp-includes folders on your server. Read the Manual Update directions first: http://codex.wordpress.org/Updating_WordPress#Manual_Update
check the Master List to see if you're experiencing a known issue
Login to your wordpress dashboard (wp-admin) and go to Settings->Permalinks, select Default and save changes.
Update all urls(path) using this querys then check:--
Use this querys for change all urls(path) for db then check
UPDATE wp_options SET option_value = replace(option_value, 'http://live_ste_path.com', 'http://localhost/local_site_path') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET post_content = replace(post_content, 'http://live_ste_path.com', 'http://localhost/local_site_path');
UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://live_ste_path.com','http://localhost/local_site_path')`
[WSOD RESOLVED]
Since I could not find any solution to my problem by googling around, a crucial tracking info I finally found in WP error logs. So I would recommend to inspect logs before spending to much time looking for a proper answer by google.
After migration from an old web host to a new one, in my multisite environment all sites were working. Also, I was able to administer all subsites - but one! Trying wp-admin login to that site led me to fatal white screen. Without any message or any indication about the reason. And the culprit was corrupted file /public_html/subsite-x/wp-admin/admin.php. I really could not understand how that happened, just might suppose it appeared somehow while transferring files (FTP) from old host to a new one.

Categories