السبت، 3 أغسطس 2019

Creating Your Personal Profile

Creating Your Personal Profile

To personalize your site, visit the Profile screen of your WordPress Dashboard. To access the Profile screen, hover over the Users link in the Dashboard navigation menu, and click the Your Profile link. The Profile screen appears, as shown in Figure.

Here are the settings on this page:
» Personal Options: In the Personal Options section, you can set these
preferences for your site:
• Visual Editor: Select this check box to indicate that you want to use the
Visual Editor when writing your posts. The Visual Editor refers to the
formatting options you find on the Write Post screen (discussed in detail in
Book 4, Chapter 1). By default, the check box is deselected, which means
that the Visual Editor is off. To turn it on, select the check box.
• Syntax Highlighting: Select this check box to disable syntax highlighting. This
option disables the feature in the Dashboard theme and plugin code
editors that displays code in different colors and fonts, according to the
type of code being used (HTML, PHP, CSS, and so on). I cover theme and
plugin code in Books 6 and 7, respectively.
• Admin Color Scheme: These options set the colors for your Dashboard. The
Default color scheme is automatically selected for you in a new installation,
but you have other color options, including Light, Blue, Coffee, Ectoplasm,
Midnight, Ocean, and Sunrise.
• Keyboard Shortcuts: This check box enables you to use keyboard shortcuts
for comment moderation. To find out more about keyboard shortcuts,
click the More Information link; you’re taken to the Keyboard Shortcuts
page (https://codex.wordpress.org/Keyboard_Shortcuts) of the
WordPress Codex, which offers helpful information.
• Toolbar: This setting allows you to control the location of the admin toolbar
(see Book 3, Chapter 1) on your site. By default, the admin toolbar appears
at the top of every page of your site when you’re viewing the site in your
browser. It’s important to understand that the admin toolbar appears only
to users who are logged in, however. Regular visitors who aren’t logged in
to your site can’t see the admin toolbar.
» Name: Input personal information (such as your first name, last name, and
nickname), and specify how you want your name to appear publicly. Fill in the
text boxes with the requested information.
The rest of the options aren’t shown in Figure 2-9; you have to scroll down to
see them.
» Contact Info: In this section, provide your email address and other contact
information to tell your visitors who you are and where they can contact you.
Your email address is the only required entry in this section. This address is
the one WordPress uses to notify you when you have new comments or new
user registrations on your site. Make sure to use a real email address so that
you get these notifications. You can also insert your website URL into the
website text field.
» About Yourself: Provide a little bio for yourself, and change the password for
your site, if you want:
• Biographical Info: Type a short bio in the Biographical Info text box. This
information can appear publicly if you’re using a theme that displays your
bio, so be creative!
When your profile is published to your website, anyone can view it, and
search engines, such as Google and Yahoo!, can pick it up. Always be
careful with the information in your profile. Think hard about the information you want to share with the rest of the world!
• Profile Picture: Display the current photo that you’ve set in your Gravatar
account. You can set up a profile picture or change your existing one within
your Gravatar account at https://gravatar.com.
» Account Management: Manage your password and user sessions, as follows:
• New Password: When you want to change the password for your site, click
the Generate Password button in the New Password section. You can use
the password that WordPress generates for you or type your own password in the text field that appears.
Directly below the New Password text field is a password helper, where
WordPress helps you create a secure password. It alerts you if the
password you chose is too short or not secure enough by telling you that
it’s Weak or Very Weak. When creating a new password, use a combination
of letters, numbers, and symbols to make it hard for anyone to guess (such
as b@Fmn2quDtnSLQblhml%jexA). When you create a password that
WordPress thinks is a good one, it lets you know by saying that the
password is Strong.
Change your password frequently. Some people on the Internet make it
their business to attempt to hijack sites for their own malicious purposes. If
you change your password monthly, you lower your risk by keeping
hackers guessing.
• Sessions: If you’re logged in to your site on several devices, you can log
yourself out of those locations by clicking the Log Out Everywhere Else
button. This option keeps you logged in at your current location but logs
you out of any other location where you may be logged in. If you’re not
logged in anywhere else, the button is inactive, and a message appears
that says You are only logged in at this location.

When you finish setting all the options on the Profile screen, don’t forget to click the Update Profile button to save your changes.

Creating .htaccess files

Creating .htaccess files

You and WordPress work together in glorious harmony to create the .htaccess
file that lets you use a pretty-permalink structure in your site.

To create the .htaccess file, you need to be comfortable uploading files via SFTP
and changing permissions. Turn to Book 2, Chapter 2 if you’re unfamiliar with
either of those tasks.

If .htaccess already exists, you can find it in the root of your directory on your
web server — that is, the same directory where you find your wp-config.php file.
If you don’t see it in the root directory, try changing the options of your SFTP
client to show hidden files. (Because the .htaccess file starts with a period [.],
it may not be visible until you configure your SFTP client to show hidden files.)

If you don’t already have an .htaccess file on your web server, follow these
steps to create an .htaccess file on your web server and create a new permalink
structure:

  • 1. Using a plain-text editor (such as Notepad for Windows or TextEdit for a Mac), create a blank file; name it htaccess.txt and upload it to your web server via SFTP.
  • 2. After the file is uploaded to your web server, rename the file .htaccess (notice the period at the beginning), and make sure that it’s writable by the server by changing permissions to 755 or 777.
  • 3. Create the permalink structure on the Customize Permalink Structure page of your WordPress Dashboard.
  • 4. Click the Save Changes button at the bottom of the Customize Permalink Structure page.
WordPress inserts into the .htaccess file the specific rules necessary for
making the permalink structure functional on your site.

If you follow the preceding steps correctly, you have an .htaccess file on your
web server with the correct permissions set so that WordPress can write the correct rules to it. Your pretty-permalink structure works flawlessly. Kudos!

If you open the .htaccess file and look at it now, you see that it’s no longer blank.
It should have a set of code in it called rewrite rules, which looks something like
this:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
I could delve deeply into .htaccess and all the things you can do with this file, but
I’m restricting this chapter to how it applies to WordPress permalink structures. If
you want to unlock more mysteries about .htaccess, check out “Comprehensive
Guide to .htaccess” at www.javascriptkit.com/howto/htaccess.shtml.


WORKING WITH SERVERS THAT DON’T USE
APACHE MOD_REWRITE

Using permalink structures requires your web hosting provider to have a specific
Apache module option called mod_rewrite activated on its servers. If your web hosting
provider doesn’t have this item activated on its servers, or if you’re hosting your site on
a Windows server, the custom permalinks work only if you type index.php in front of
any custom permalink tags.
Create the custom permalink tags like this:
/index.php/%year%/%month%/%date%/%postname%/
This format creates a permalink like this:
https://yourdomain.com/index.php/2019/01/01/wordpress-all-in-onefor-dummies
You don’t need an .htaccess file to use this permalink structure