Installing of WordPress to the branch of site - php

We created a website on WordPress (do it locally by Denwer - the russian example of XAMPP). It's time to test and to rearrange it to the branch of site. For example, http://site.ru/test/. I.e. when I am handling to this address, our site should open by WordPress, but not old pattern http://site.ru (there are only html/css code). I threw in a folder "test" by the FTP all files of WordPress, made the import of the database, replacing her line, which was listed a local address of the site (for example, primer/ to http: //site.ru/test/. The site is installed. The home page works without bugs, but when you're trying to go to any page of the site WP, an error 404 is occured: "Not Found. The requested URL /index.php was not found on this server." Question: Is it possible in any way to fix this? If so, how? Thank you and sorry for my english

If I'm understanding you properly, you can open your .sql file with Dreamweaver or a similar program, replace your current url with the new url and be on your way. You also have to make sure that your Wordpress URL and Site URL also get changed in the mix as well. These are in the options section of your Wordpress database.

Related

WP-Admin redirects to old URL (after editing config.php)

I am trying to get a client's WordPress site copied over to my company's server to use as a development site. I've ran into an issue when trying to log into the site's administrator panel; it redirects us to the existing site's URL instead (ending up as [OLD SITE]/[NEW URL]/wp-admin). Additionally, trying to go to any page other than the homepage gets a 404.
I've tried editing the wp-config and defining the WP_HOME and WP_SITEURL there, with no success. In a previous attempt we used a backup tool that was meant to replace references to the old URL with the new URL, and on another we ran queries and checked through wp-options in the database to be sure that we caught all of the old references. Still redirects to the old site.
We've tried restoring from two backups, Akeeba and BackUpWordPress. Our current attempt is a copy we've downloaded directly and then uploaded (with an imported SQL backup).
Another odd thing I've noted is that changing one of the URLs in the database causes more issues. Mainly, if I update the URL of 'wordpress-https_ssl_host' in the wp-options table, the theme breaks. Not sure where to go with this from here.
I'm always succesfully using the following script : search & replace:
https://interconnectit.com/products/search-and-replace-for-wordpress-databases/
in order to update a wordpress site url.
Just copy the provided code in a directory under your site, then launch the provided index.php in a browser: the database infos should be automatically determined. Then specify the old and new urls and click on "Run" !
Don't forget to remove the created directory afterwards.
For solving this issue you have to change siteurl in database wp_options table
option_name = siteurl where
option_value = YOUR OLD SITE URL
change your old site url and update it with your local developement site URL
Hope this will help you..
We found the problem; as it turns out it was nothing to do with anything from the default WordPress files. The client was using an extension called WordPress HTTPS, and apparently that was causing a conflict somewhere. We renamed the extension's folder to disable it and everything ran fine. I imagine it was overriding what we were setting in wp-config.

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

Incorrectly Changing WordPress URLs on Same Server

So we have a dedicated server and we installed a single instance of Wordpress on this URL (using URL as example): AnytownBoatTours.com. Started themes and plugins etc... and the owner said the URL needs to be the other way around: BoatToursAnytown.com.
So, we pointed the new domain to existing instance of WordPress (since they are on the same dedicated server), and then I followed wordpress instructions by going into Settings -> General and changed both the Wordpress Address (URL) and Site Address (URL) to BoatToursAnytown.com (with no "/" at ending on either).
So, everything appears to be fine. The Wordpress site seems to have accepted the URL change and I've logged in and made changes to the home page and theme. Then I came across a weird error with sub pages I'd created before the switch. The error occurs in all pages except the home page. When I click on any of the pages except home and edit them, when I hit update or preview buttons, the preview goes to a 404 message. I thought that is weird so I started looking around.
I discovered that the content directory is still pointing back to the old URL. The Wp-config Location is: D:\Websites\AnytownBoatTours.com/wp-config.php and the Content Directory is: D:\Websites\AnytownBoatTours.com/wp-content
So obviously the change in General Settings didn't work. I was hoping someone could help me figure how to go from here.
Thank you
Update your permalinks even if it's not changing them, you just need to click the save. Settings > Permalinks and press Save Changes. This will more then likely fix the issue as I had to do it when I recently migrated a clients site.

Dynamically-related files could not be resolved because of an internal server error - Dreamweaver CS5 Error

I am building a Wordpress website in Dreamweaver CS5 and am also using MAMP for my PHP/MySQL needs.
The problem is that when I create a new Wordpress site in Dreamweaver (I have an existing Wordpress template), and I open the index.php file, it asks me if I want to discover any other files that are dynamically related to the index.php file. I click "Discover", then I get this error: "Dynamically-related files could not be resolved because of an internal server error."
My MAMP document root is: /Users/Burton/Sites/
In the document root I have a sub-directory called Wordpress where all the Wordpress files (including my theme) are stored
In Dreamweaver I created a new site and here are the settings for it and the server:
Site Name: Test Site
Local Site Folder: /Users/Burton/Sites
Server Name: Local Testing
Connect Using: Local/Network
Server Folder: /Users/Burton/Sites
Web URL: http://localhost:8888/Wordpress
Server Model: PHP MySQL
Testing: On (Make it a test server)
Going to the site via a web browser is fine, I can see the template and everything. I can edit the site in Dreamweaver and see the changes made in the browser, but I want Dreamweaver to discover those other files so I can do Live View in Dreamweaver, but this error is preventing me from doing it.
I've looked at countless tutorials and visited many forums but no one has the answers...
Anybody out there have idea what is causing this?
Thanks!
This happens with DW and WordPress sites because WordPress doesn't use normal include calls but instead does this dynamically based on what the user is doing at the time. DW cannot handle that complexity in design view and chokes on it, displaying the message that you see.
I had this issue, for me it was a mixture of the mysql server address in wp-config.php pointing to localhost when infact the database was on a different domain, and wordpress thinking that it was deployed on the remote / live domain rather than locally.
Changing the database vars (they are at the top of the file, well commented) to point to the right database fixed it.
// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'DATABASENAME');
/** MySQL database username */
define('DB_USER', 'DATABASEUSER');
/** MySQL database password */
define('DB_PASSWORD', 'DATABASEPASSWORD');
/** MySQL hostname */
define('DB_HOST', 'DATABASEADDRESS');
Also, make sure you have, locally, a complete copy of all files in the wordpress install. I installed mine on a remote server via a CGI script, if you do the same then make sure you copy the whole lot to your local site.
The last peice of the puzzle for me was changing the WordPress address (URL) and Site address (URL) inside wp-admin to point to my local copy, relative to Dreamweaver - i.e 192,168.x.xxx/wordpressinstall
(I had to log in on my domain (www.wordpresstest.something) to access the admin tool to do this, then it redirects back to the new address when you save - so make sure you have it correct or it's hard to fix).
Hope this helps anyone else with the same problem.
I found this on this thread
I have come across the same issue and found this thread. The post that explains a bit what we want to hear is post #6 by David_Powers on 01-May-2010 at 05:31.
So to make the problem go away you can go to 'Edit -> Preferences' and disable 'Discover Dynamically-Related Files' while leaving 'Enable Related Files' activated.
Although this fixes the error display I don't quite understand what David_Powers says this function will do and if I actually want it turned on. If someone could help me realize what this option does I would appreciate it.
I found the solution from this link
And verified solution is as follow:
Open your site in Dreamweaver and wait for the message at the top, telling you that there are related files to be discovered. Hit “Discover” and get the error message.
Next login to your local WordPress site via a browser and remember what the current Permalinks are set to (under Settings – Permalinks).
Choose the Default (first option) and hit save.
Go back to Dreamweaver and try the discovery option again. All related files are discovered – hurray!
Head back over to your WordPress site and change the Permalinks back to what they were, then hit save.
I know this is a bit hacky, but until Adobe can figure out a working solution this is as good as it gets, and not really that cumbersome.
It's all about "Permalinks". The problem is the web URL address that you have entered in the test server setup has not the same structure, which WordPress uses.
Open your WordPress Dashboard, under Settings choose Permalinks ( Settings > Permalinks ). You'll see what structure is defined in Wordpress and, maybe, this is a different one, which you have introduced into DW: http://localhost:8888/Wordpress. And your permalinks structure in the WordPress is like http://localhost/yoursite/?p=123.
Check custom structure radio button - http://localhost/sitename and click Save.
Go back to DW site > Manage sites > Edit {your-site}, in the Server tab choose your server, hit the Edit button and put the same structure in the web URL box: http://localhost/sitename.
Local site folder and server folder should be like C:\wamp64\www\sitename\.
I use WAMP and DW on Windows, so do the math yourself.

Help with Clean URLs

I am very new to php (in fact about 2 days old). After getting ripped off by my last webhost I have decided to move my website to a different host. A friend has been helping me do this as he has a little info but we are now stuck and I have tried finding a soloution on google but most answers are way over my head. My site is a php site with a mysql database. We have moved the database and ftp'd the site and everything is now working on the new server except one thing - my site was designed originally to use clean urls? When I go to my shop page (ie: mywebsite.com and click on the shop link - mywebsite.com/shop/ (shows in the bottom left of my browser) I get a page not found error, yet when I type in the url mywebsite.com/shop.php the page displays fine. In addition, if I go to mywebsite.com/shop/shoes/ (another link which shows the preceding link in the bottom left hand corner) I get a page not found error. Also if I type in mywebsite.com/shop/shoes.php in the address bar I also get a page not found error even though the page shoes.php exists on the ftp server in a folder called templates - if I go to mywebsite.com/templates/shoes.php it shows up) I understand this is called clean urls and I need to add an .htaccess file to sort out the issue. I have looked on the ftp area of my old host and cannot find this file but have been told it is probably hidden. I have been told by my new provider that mod-rewrite is available on the server but I have no idea how to write this htaccess file. Can anyone please give me a step by step on how to do this as I am not a coder.
Additional Details
I have the following files in my root directory: index.php, shop.php, checkout.php, completed.php, contact.php ... I then have a folder called templates and in this folder I have: shoes.php. clothes.php, coats.php ...
The issue I am having is that most of the php files in my root directory already have href-links? pointing to places like mysite.com/shop/ and mysite.com/shop/shoes/ so when I open up the home page in my browser and hover over the links these are the addresses I see and when I click on the links I get page not found as the borwser must be looking for the links in the wrong place. (these links worked fine however on the last host I used). I understand I need an htaccess file to re-direct these links to the correct places. - ie the link for mysite.com/shop/shoes/ is actually linking to a page called shoes.php located in root/templates. I understand this method was used to tidy up the urls?? ie: instead of having mysite.com/templates/shoes.php the urls shows mysite.com/shop/shoes/. I have looked at the code within some of the php pages in the root and they all have lots of links to these 'false' addresses - ie: mysite.com/shop/shoes/ when the actual file should be at mysite.com/templates/shoes.php. I don't want to go through each file one at a time as they are hundreds of links, thus the reason for trying to make this htaccess file. Thanks for your time, Dave
Try to find an option on your FTP client software to show hidden files.
The name of this file is .htaccess (dot htaccess), that is probably the reason you're not seeing it. If the old site is working then the file is probably there. You could also contact somebody to send you the file via e-mail, IM, etc.
You do not need mod_rewrite or .htaccess for this.
Turn on multiviews in your Apache configuration. This will allow you to omit the .php extension from your URLs.

Categories