I migrated a domain to a new server and now I see some url's with server name in source code, instead of domain name. For example:
http://servername.com/wp-includes/js/jquery/jquery.js
http://servername.com/wp-content/plugins/contact-form-7/includes/css/styles.css?ver=4.5
also can't login to admin panel via proper url:
http://my-domain.com/wp-admin
redirects me to
http://servername.com/wp-admin
Site works fine beside that. How do I set this up correctly?
In the wp_options table in the database, you'll need to change the siteurl value.
For full how-to see here
Backup your database and save the copy off-site.
Login to phpMyAdmin.
Click the link to your Databases.
A list of your databases will appear. Choose the one that is your WordPress database.
All the tables in your database will appear on the screen.
From the list, look for wp_options. Note: The table prefix of wp_ may be different if you changed it when installing.
Click on the small icon indicated as Browse.
A screen will open with a list of the fields within the wp_options table.
Under the field option_name, scroll down and look for siteurl.
Click the Edit Field icon which usually is found at the far left at the beginning of the row.
The Edit Field window will appear.
In the input box for option_value, carefully change the URL information to the new address.
Verify this is correct and click Go to save the information.
You should be returned to your wp_options table.
Look for the home field in the table and click Edit Field. Note There are several pages of tables inside wp_options. Look for the >
symbol to page through them.
In the input box for option_value, carefully change the URL information to the new address.
Verify this is correct and click Go to save the information.
Related
I have recently migrated my DB to a staging environment using string find and replace on the DB to rename the domain. This has made the ACF fields in the CMS to go missing.
That page should have several fields available. And while the fields are showing in the pages that ACF group is assigned to I can't edit or see them here any more. I can't even create a New ACF group because I can't see the Add Fields box.
The website works fine, the only issue is the fields cannot be edited anymore.
Any ideas?
Solution:
Go to your DB, open table usermeta, find your user and delete the field acf_user_settings
I want to remove custom Domain from Github. Any help, please.
Actually I want get https://myaseen208.github.io/DiallelAnalysisR/ rather than http://www.myaseen208.com/DiallelAnalysisR/ as given the following picture.
As illustrated in isaacs/github issue 1213 (which shows a similar problem), you should have a CNAME file
But not in: github.com/MYaseen208/DiallelAnalysisR
In the repo github.com/myaseen208/myaseen208.github.io (same as in the issue 1213): this CNAME file, which does include:
www.myaseen208.com
Apparently your user's GitHub domain automatically comes from your {username}.github.io repo
Start by removing that file, and see if that changes anything (wait a bit, and clear your browser local cache)
I was having the same issue. I resolved it by emptying the custom domain field, then entering a space in the same field so that you can activate the save button (Note: the save button will not let you save if the field is empty).
After you hit save, your page will reload and you will be able to see this again
Delete the content of the text box and press “Save”
If you want your user name's GitHub domain back which automatically comes from your {username}.github.io repo then simply empty the custom domain input field and enter a space in the custom domain field in order to activate the save button as the save button will not let you save until the field is empty.
Hit save & your page will reload and you will see your static site live on your Github username domain.
I have to build an "admin only" page where an admin user can input 3 objects - a person's "name", "description" and a photo. this way they can add/edit/delete people from the website.
I have tried adding "add_menu_page()" to the admin navigation menu and that worked, but I'm kind of lost as to what to do next, or even if I'm on the right track.
I'm assuming I will load the people into the WP database and query the database when i need to display each person.
Yes you are on the right track. Just create a form for the admin where he/she can enter the name, description and photo of a person.
You should make another page using the same method i.e. add_menu_page() and load your WP DB there and provide the option to the admin to delete, edit or add from there.
We know that /author/user can show personal information at all users.
Well in my case, each user has a personal folder whitin contents.
My goal is to show the info in /author/user, when an user visit the personal folder of each user. This info must be show first, with the option "select a content item as default view".
I've created a link to /author/user and option "select a content item as default view".
The problem is that the user are redirected to /author/user and cannot navigate in the personal folder.
Is there a trick that solve this problem?
Instead of realizing this with a content item as default view you could just register a new view for folders, being a customized copy of author.pt.
you've two problems: change the default view for user folder (only for those) and creating a new view.
Use the code from author.cpt to make a new skin cpt (or just a .pt removing the feedback form if you don't need it), and just change:
author python:(len(request.traverse_subpath) > 0 and url_unquote_plus(request.traverse_subpath[0])) or request.get('author', None);
to something that grab the user from username or /Members/<> path. Then copy the Folder type in portal_types to a new id (New User Folder or similar), assign this as a default folder in portal_membership for the user and in portal_types -> New User Folder and assign it as default view.
Then you've to migrate all users home folder to this new folder type.
An alternative is to have an index_html script that loads the alternative view, maybe just calling author.cpt with the author parameter in the request:
context.author(author=<<this folder author>>)
where <> is obtained as before. You can add this index_html following this hint on doing things after the user log in:
http://collective-docs.readthedocs.org/en/latest/sessions/login.html#post-login-actions
I have a local build of Drupal 7 with Xampp on windows. When I add a field to a node's content type, I see the field appear last, no matter what order I put the field in Content types > [myType] > Manage fields. I would tend to think this is a cache problem... but I've tried Configuration > Performance > Clear all caches, and the order of the fields does not update.
For example, I currently have an image field, a display title field, and a body field. In the Manage Fields lightbox, the order of the fields is:
Image
Display Title (New field, I'm not using the default title because Drupal always places is above the image instead of after)
Body
However, on the page the order is
Image
Body
Display Title
This is not just a trick caused by funky CSS—the PHP is actually creating the HTML in the wrong order.
I'm guessing that Drupal updates when you add a new field (which appears last by default when created). It does not update when fields are repositioned in Manage Fields, leaving the title last on the page, although it's second in Manage Fields.
And yes, I did save the configuration after repositioning the fields in Manage Fields. I've also cleared the browser cache, and restarted the browser.
How can I get Drupal to display the fields in the order they appear in Manage Fields?
P.S. I also downloaded Drush to see if it could clear the cache. The Drush command line works, but none of the tutorials I found actually explain how to hook Drush up to a local install, only how to SSH into remote server... I typed in 'drush cc' my drupal folder, but I don't know if Drush actually did anything since I don't know how to make drush connect to my localhost.
Not a complete answer, but 'Manage Display' does not, in fact, Manage the Display. It manages the order of the fields when editing a content type, but does not influence the order in which they are displayed.
So, I was looking at it again (figuring I would have to edit into printing individual fields in the content)... and I was looking at the Devel tab (Developer module), and clicked 'render.' Some how that fixed / updated the page, and the title jumped from the bottom to above the body text.
Still not sure exactly what controls the order that fields display in... Maybe I'm a complete n00b, but if the info's out there, it's hard to find.